The type of the form state.
Optional autoDecide when to auto validate the form. Defaults to onChange.
immediate - Show validation errors as soon as the hook mounts.
onChange - Show validations after the user has changed the input.
onBlur - Show validations after the user has blurred the input.
never - Show validations after the user has submitted the form only, or on manual trigger.
validate for manual validation trigger
Optional errorMap of custom error messages for the default validation methods.
Optional initialThe initial state of the form. This will cause the form inputs to be pre-filled with the given data. Any missing field will be empty.
Optional onCallback that will be fired when the form is submitted. The callback will receive the form data.
Generated using TypeDoc
Options for the
useFormhook