isValid is being flagged as true upon first entering the form.
isValid should be marked as false, even if the isInitialValid property has not been set
document breaking changes, or not require isInitialValid to be set and still have isValid flag false
This behavior was not seen in V1 and with the V2 update many changes were made and were not documented under breaking changes.
| Software | Version(s) |
| ---------------- | ---------- |
| Formik | latest
| React | latest
| TypeScript |
| Browser | all
| npm/Yarn | latest
| Operating System | mac
Has anyone else noticed this behavior?
@mrowe009 I've noticed too. :(
But this part of the migration talks a litle about it
Line 236
I fixed it with @sclavijo93 info, I just added:
<Formik
validateOnMount
...
@sclavijo93 i see now, that is very well hidden at the the bottom of the page. I didn't realize validateOnMount was running on its own in V1. I figured it was just a flag being set on initial render.
@difagume i also used that solution as well. but thanks for providing the solution so others can see 馃憤
bump
Most helpful comment
I fixed it with @sclavijo93 info, I just added: