it was working fine yesterday, but today it stopped working o/
it is throwing this error;
Uncaught (in promise) TypeError: field.resolve is not a function
at eval (object.js?0109:159)
at eval (transform.js?50ca:60)
at arrayEach (_arrayEach.js?8057:15)
at transform (transform.js?50ca:59)
at ObjectSchema._cast (object.js?0109:147)
at ObjectSchema._validate (mixed.js?b64f:261)
at ObjectSchema._validate (object.js?0109:187)
at ObjectSchema.validate (mixed.js?b64f:303)
at validateYupSchema (formik.esm.js?2983:519)
at eval (formik.esm.js?2983:175)
it should not thrown an error
| Software | Version(s) |
| ---------------- | ---------- |
| Formik | 1.0.3 and 1.3.1 (tested on both)
| React | 16.4.1
| TypeScript | using pure js
| Browser | chrome
| npm/Yarn | yarn
| Operating System | mac os
never mind, bug on our validationSchema
tks
I had this same problem while using nested forms ... I later realized that with nested forms every level on nesting should be wrapped in yup.object ... I did that and it worked for me ... hope this helps :)
I spent a few minutes trying to solve this issue just to find out that I forgot the method call:
wrong:
{
first_name: Yup.string().required
}
correct:
{
first_name: Yup.string().required()
}
Most helpful comment
I spent a few minutes trying to solve this issue just to find out that I forgot the method call:
wrong:
correct: