Skip to main content

Function: getFieldValidationError()

getFieldValidationError<Value>(fieldConfAtom): null | FieldValueError

Defined in: lib/forms/fields.ts:103

Hook to check if a particular field is valid, using the field's configured 'valid' custom hook, or the field's configured basic constraints. Returns null if valid, the validation error otherwise.

Type Parameters

Value

Value

Parameters

fieldConfAtom

FieldConfigAtom<Value>

The field configuration atom.

Returns

null | FieldValueError

The validation error, or null if valid.