Closed andrewringler closed 4 years ago
Form level validation is not available out-of-the box, but you can use a custom container or a custom submit button field and add your validation check there.
Each custom element (container or field) gets an object formik
which holds the formik props. You can use it to check your logic and show a message based on that logic.
Thanks, that makes sense. Andrew
I have a bunch of fields with field-level validation. When I click submit on the form, I get error messages inline with each invalid field but I would also like to display an error message near the submit button that says something like "Please correct the highlighted fields above".
Is there any way to access to the state of form validation from the