Replies: 1 comment
-
For anyone who finds this who is running into the same problem - I found a workaround, but it's kind of a hack. If you set the It would still be nice to have the ability to reset the mode though. I know react-hook-form has an example wizard that uses multiple forms, but it doesn't work well for situations where the "Next" and "Previous" buttons are outside of the form. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a wizard. It's one form and the next button does a submit - verifying inputs before moving to the next step. The validation works as expected for the first step, but subsequent steps start in reValidateMode. Is there a way to reset the form to be back in "mode"?
One solution would be to set reValidateMode to "onSubmit", but I like the behavior of reValidateMode after Next is pressed if there are problems on the step. I just don't want to be in "reValidateMode" for every step after the first step.
Another option I saw is to use "trigger", but that seems functionally equivalent to setting mode and reValidateMode to onChange, since validation errors found with trigger clear based on "mode" (if the form is unsubmitted).
Beta Was this translation helpful? Give feedback.
All reactions