在Formik Yup中进行嵌套验证

时间:2020-09-27 11:06:30

标签: reactjs formik yup

我正在将Formik与yup一起用于验证我的表单,我想对嵌套对象应用验证,但是出现未定义的错误。我能够按预期保存数据,但无法应用验证

This my Yup Validation Schema in Image one

This is my initial Schema in Image two

I am able to save the data as expected If I uncomment isInvalid I get error

I get undefined error

0 个答案:

没有答案