Open yoruvo opened 4 years ago
This is by design (https://github.com/jannikbuschke/formik-antd#submitting-and-resetting-forms).
If the button would be disabled, the user might not see any validation feedback, as it is usually only rendered if the corresponding field has been touched. By enabling the submit button and clicking it, all fields will be touched, thus rendering the feedback if the form is invalid. You might want to run validation again in your submit handler, if you don't want to send an invalid form to your backend (there you should validate anyway).
See also #135, #125, #87, #73
Possible values in form:
Initial values:
Validation schema:
As you can see, all the fields are required, but many are empty.
Yet, at the start of the form, and whenever you reset to the "initial values" (Version at 1.10.0, Topic at "error", rest empty), the Submit Button is enabled despite not passing validation.