A form instance detects user interaction with the form DOM and updates its state accordingly. It has a set of properties available through the API so that developers can create good user experiences with immediate response to user input and interactions.
Most properties are available both for the entire form and for individual fields.
However, some properties make sence only for a form or for a field.
touched: at least one of the form controls has had a blur event since the form was reset / first rendered
untouched: none of the form controls has has a blur event since it was reset / first rendered
dirty: at least one of the current form values is not shallow equal to its initial value
pristine: each of the current form values is shallow equal to its initial value
valid: no validators have (yet) reported an error in the last validation check
There may be async validators still running.
invalid: at least one form or field validator has reported an error in the last validation check
validating: there is at least one async validator still running from the last validation check
value (field-only): the current field value
initialValue (field-only): the initial field value
message (field-only): the validation message (if any) from the last validation check
values (form-only): the current form values
initialValues (form-only): the initial form values
messages (form-only): an array of all field- and form-level validation messages from the last validation check
submitting (form-only): an async submission operation is progress
A form instance detects user interaction with the form DOM and updates its state accordingly. It has a set of properties available through the API so that developers can create good user experiences with immediate response to user input and interactions.
Most properties are available both for the entire form and for individual fields. However, some properties make sence only for a form or for a field.
touched
: at least one of the form controls has had ablur
event since the form was reset / first rendereduntouched
: none of the form controls has has ablur
event since it was reset / first rendereddirty
: at least one of the current form values is not shallow equal to its initial valuepristine
: each of the current form values is shallow equal to its initial valuevalid
: no validators have (yet) reported an error in the last validation check There may be async validators still running.invalid
: at least one form or field validator has reported an error in the last validation checkvalidating
: there is at least one async validator still running from the last validation checkvalue
(field-only): the current field valueinitialValue
(field-only): the initial field valuemessage
(field-only): the validation message (if any) from the last validation checkvalues
(form-only): the current form valuesinitialValues
(form-only): the initial form valuesmessages
(form-only): an array of all field- and form-level validation messages from the last validation checksubmitting
(form-only): an async submission operation is progress