-
Notifications
You must be signed in to change notification settings - Fork 89
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
Method pauseValidation not working in my custom form template #1435
Comments
Hello, Is there any update on that topic? I would appreciate any info since this thing is important in my project. |
What is your use case? @anjalikalsariya I never used pause validation feature myself but maybe there is another alternative. |
Here is my use case: My customer requirement is the validation should apply when clicking on the submit button only. But currently when users click on the field and do nothing and go out from the field then showing validation error. So, I had thought, I would pause validation when rendering the form, and once the user clicks on the submit button I'll resume the validation |
@anjalikalsariya For that use case you could use submit validation: https://final-form.org/docs/react-final-form/types/FormProps#onsubmit In onSubmit function you can return an object with errors. |
Thanks @rvsia Currently, a validation error showing when onblur event fields and as well click the submit button. |
@anjalikalsariya In that case remove validation from fields and just keep it in the submit function. |
Yes, right now only that way is possible. I'll write custom validation instead of schema field validation. |
What is the current behavior?
My Code
What is the expected behavior?
The text was updated successfully, but these errors were encountered: