-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Is there a way to trigger validation for all inputs on "Submit" ? something like formState.validateFields() or something.
I don't want to use the HTML5 api for form validation at all (<form noValidate={true} />) , therefore when the user clicks "submit" I want the fields that are required to show the error message that they're required. This is how react-hook-formand other frameworks work.
I understand I can "disable" the submit button with the Pristine() function, but I don't want to disable this button, also, if there is a field input that needs to have the same value as other input (password confirmation or email confirmation) the user can just click "submit" either way, since Pristine() just throws false at this point.
Is there a work around for this functionality?