Closed ulisesbocchio closed 6 years ago
I trigger the submit
action directly through a reference to the ValidatorForm
, so I gotta know weather validation was successful or not.
If your validation was successful your submit
function will execute, right? Also you have onError
function that triggers when some validations are failed and isFormValid
to get current form validation state
yeah, I check wether the form is valid or not after submit. Since I'm triggering directly, it doesn't sound like a good idea to break apart the logic of checking into a 'onSubmit. Also
isFormValid` re-runs validation in dry mode, which is a waste since the result is RIGHT THERE. Any other option has unnecessary overhead.
Thanks for your work
Hi, Thanks for your work, but can you give some reasons for this changes? What kind of problem you trying to solve?