-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externally determining if form has errors #2343
Comments
should an easy change, if you want to make a PR, to include this functionality, please do. Possibly another callback called isValid could be added that we can called to check state of the form. regarding the submit button, I have a PR that will give more flexibility to hide the button. Read only forms will then be a possibility and change the text |
Are you able to get something like
|
Prerequisites
Description
Honestly this is just quick question that I didn't find in searching first. Being that I'm not using submit button because of displaying a form in a dialog and wanting to use submit button of my modals, I'm curious what the best way to determine whether the form was in a "good" state... rather that validation is passing.
I know I can provide a
onChange
callback, and get ate.errors
. Would the best way of providing the state to my modals button be to set a state variableisValid
toe.errors.length> 0
and then use that as whether my button is enabled/disabled?Is there a better way to get at that more directly? Appreciate any feedback.
The text was updated successfully, but these errors were encountered: