You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 using
validationSchema: 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
The text was updated successfully, but these errors were encountered: