Skip to content

FormValidation

katanakit-js / FormValidation

type FormValidation<T> =
| {
errors: FieldErrors;
ok: true;
values: T;
}
| {
errors: FieldErrors;
ok: false;
values: null;
};

Defined in: types/core/forms.ts:8

Outcome of validating a native form: the parsed values, or the per-field messages that blocked them. Both shapes carry errors so the caller can render an empty map on success without a branch.

Type Parameter
T