To submit a form in Formik, you need to somehow fire off the provided
submitForm prop. When you call either of these methods, Formik will execute the following (pseudo code) each time:
initialValuesare required and should always be specified. See #445
validationSchemaasynchronously and deeply merge results
false, proceed to "Submission"
setSubmitting(false)in your handler to finish the cycle
It is common practice to only show an input's errors in the UI if it has been visited (a.k.a "touched"). Before submitting a form, Formik touches all fields so that all errors that may have been hidden will now be visible.
Disable whatever is triggering submission if