Describe the bug
When describing a schema that has one or more transform()s.
Right now a type error is shown when using validationSchema: toFormikValidationSchema(mySchema),.
To Reproduce
Steps to reproduce the behavior:
Create a schema containing transform e.g. string => number
Use toFormikValidationSchema with that schema
See error
The types of '_input.age' are incompatible between these types.
Type 'string' is not assignable to type 'number'.
Expected behavior
The TypeError should not be shown as only the fully transformed type should be considered.
Describe the bug When describing a schema that has one or more
transform()
s. Right now a type error is shown when usingvalidationSchema: toFormikValidationSchema(mySchema),
.To Reproduce Steps to reproduce the behavior:
transform
e.g. string => numbertoFormikValidationSchema
with that schemaExpected behavior The TypeError should not be shown as only the fully transformed type should be considered.
Node version: 19.12.0
Zod, Formik and zod-formik-adapter versions:
Additional context Check this CodeSandbox for example https://codesandbox.io/s/formik-zod-test-forked-eyoy4j?file=/index.tsx