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?
The FormInstance has a method validateFields: (nameList?: NamePath[]) => Promise which can be used to check if a field/all fields of the form are valid or not. This also updates the UI to display error messages/feedback on the form.
However there could be use cases where we just need to know if the form is valid or not without displaying any feedback/errors. (e.g: displaying form for the first time with pre-populated data from external source etc.)
As an example @ the CAB https://codesandbox.io/s/bitter-frost-btmsy
When I click on the Validate button, I would like to know if the form is valid or not without showing the errors/feedback on the UI.
But right now the this is not possible.
This can be useful to let's say enabling/disabling Submit button etc.
What does the proposed API look like?
May be we can add an option/flag to the validateFields to allow checking the form is valid or not without any UI errors/feedback.
What problem does this feature solve?
The FormInstance has a method
validateFields: (nameList?: NamePath[]) => Promise
which can be used to check if a field/all fields of the form are valid or not. This also updates the UI to display error messages/feedback on the form.However there could be use cases where we just need to know if the form is valid or not without displaying any feedback/errors. (e.g: displaying form for the first time with pre-populated data from external source etc.)
As an example @ the CAB https://codesandbox.io/s/bitter-frost-btmsy
When I click on the
Validate
button, I would like to know if the form is valid or not without showing the errors/feedback on the UI.But right now the this is not possible.
This can be useful to let's say enabling/disabling Submit button etc.
What does the proposed API look like?
May be we can add an option/flag to the validateFields to allow checking the form is valid or not without any UI errors/feedback.
e.g:
validateFields: (nameList?: NamePath[], options?: { showErrors?: boolean }) => Promise
The text was updated successfully, but these errors were encountered: