Skip to content

Functions

Field functions are used to manipulate the form as a whole. They are used to check the form state, reset it, and more.

FunctionDescription
isFormValidCheck if the form is valid
formResetReset all fields to their initial values
formToPlainConvert form to plain object (doesn't support TypeScript type inference yet)
isFormEmptyCheck if the form is empty
isFormDirtyCheck if form has any changed field
isFormTouchedCheck if the form is touched. A touched field is a field that has been focused and then blurred
formTouchAllSet all fields as touched recursively
formUnTouchAllSet all fields as untouched recursively
isFormTouchedAndValidCheck if the form is touched and valid
isFormTouchedAndHasErrorCheck if form has any touched field with error