Skip to content

useFieldValidation ​

Overview ​

Dispatches to the validation composable matching the given type string. Does nothing when type is undefined or unrecognized.

Signature ​

useFieldValidation(type, fieldContext, options)

Parameters ​

NameTypeRequiredDescription
typestringyesThe validation type (e.g. "text", "numeric", "decimal", "date", "datetime", "time").
fieldContextFieldContextyesThe field context to validate against.
optionsanyyesConstraint configuration (typically the component props object).

Returns ​

void

Source ​

client/lib/use/validation/useFieldValidation.js:31