Open alevkon opened 4 years ago
Do you have a reproducible example?
Hi, I got the same behavior. Take a look at this example https://codesandbox.io/s/elegant-star-0ru0y
And another thing, is it possible to include the form values in resolve function? my current case, I have to get the form values (if valid) from submitForm()
And I think its duplicate of #2249
Unstale :)
🐛 Bug report
Current Behaviour
Calling
submitForm()
returns promise which is successfully resolves even if form is invalid.Expected behaviour
Calling
submitForm()
should return rejected promise as the doc says:Suggested solution(s)
Probably
return Promise.reject()
or throw an error here: https://github.com/jaredpalmer/formik/blob/master/packages/formik/src/Formik.tsx#L797Your environment