It allows to get the current state of form (touched, valid) without iteration among all fields.
There are multiple use-cases:
block submit button until form is valid
block application state if there are any invalid fields
disable auto-save to prevent invalid data from saving on backend for editing
What does the proposed API look like?
I expect FormInstance to have methods/props isValid(are all fields valid), isTouched(is any field touched)
The similar approach is implemented among such libraries as
What problem does this feature solve?
It allows to get the current state of form (
touched
,valid
) without iteration among all fields. There are multiple use-cases:What does the proposed API look like?
I expect FormInstance to have methods/props
isValid
(are all fields valid),isTouched
(is any field touched) The similar approach is implemented among such libraries asProposed API: I've used antd for example, if it's not ok I can update with plain rc-field-form