And just use formik fieldArray for the insured property.
Expected behavior component should work out of the box
Zod, Formik and zod-formik-adapter versions:
zod@3.21.4
formik@2.4.1
zod-formik-adapter@1.2.0
Additional context
The problem is that formik touched property would be an array containing objects. The errors of this library would be in the form of insured.nif, insured.1.nif and so on, so you will need a custom ErrorMessage for this to work
Describe the bug Fields defined in zod as an array are not working with formik
To Reproduce Create a zod validator:
And just use formik fieldArray for the insured property.
Expected behavior component should work out of the box
Zod, Formik and zod-formik-adapter versions:
Additional context The problem is that formik touched property would be an array containing objects. The errors of this library would be in the form of insured.nif, insured.1.nif and so on, so you will need a custom ErrorMessage for this to work