Closed amatiasq-heydoc closed 1 year ago
I made formik-validator-zod
for this use case since it seems like zod-formik-adapter
is no longer being maintained (?)
Give it a try and report an issue if you find any problems 👍
That looks gr8 Glazy! Does it support unions? If so, maybe you should mention in #2
It does indeed @capaj 😄
https://github.com/Glazy/formik-validator-zod/blob/main/test/index.test.ts#L28-L37
:tada: This PR is included in version 1.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This provides a new function
toFormikValidate
that will generate avalidate
function asFormik
expects it.This supports root union types with the caveat that the root error message will be passed as property
""
of the error object:This can be a work around for https://github.com/robertLichtnow/zod-formik-adapter/issues/2
CodeSandbox