You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Sometimes you want to validate the entire collection of a form's fields together (e.g. to validate that the data makes sense together, not just that an individual field is valid).
Currently this appears to be loosely possible if one wraps a Form.create and hooks into onValuesChange, but this is a rather involved hack, and doesn't feel like it treats form-level validation as a first-class feature.
Not having something like this is pushing me towards something heavier like Formik, which I thought I could avoid (I do like the existing Antd Form API).
What does the proposed API look like?
Pass a set of custom validation rules to the Form component. Validation rules would look similar to field-level validation rules, but would receive all values of the form. Errors could be displayed either above or below the form.
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
Sometimes you want to validate the entire collection of a form's fields together (e.g. to validate that the data makes sense together, not just that an individual field is valid).
Currently this appears to be loosely possible if one wraps a
Form.create
and hooks intoonValuesChange
, but this is a rather involved hack, and doesn't feel like it treats form-level validation as a first-class feature.Not having something like this is pushing me towards something heavier like Formik, which I thought I could avoid (I do like the existing Antd Form API).
What does the proposed API look like?
Pass a set of custom validation rules to the Form component. Validation rules would look similar to field-level validation rules, but would receive all values of the form. Errors could be displayed either above or below the form.
The text was updated successfully, but these errors were encountered: