Cannot use Zod .transform
See original GitHub issueDescribe the bug
Unable to use .transform
with the zod resolver
To Reproduce
Use an input and see an error
Codesandbox link (Required) https://codesandbox.io/s/react-hook-form-zod-resolver-example-forked-khj93c?file=/src/App.tsx
Expected behavior The transform happens as expected, and errors thrown during transformation are treated as form errors
Desktop (please complete the following information):
- OS: MacOS 13 Ventura
- Browser: Chrome 102.0.5005.61 (Official Build) (arm64)
Additional context Replaces #415 (Error carried forward)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
RFC: Refactoring transformers and Zod 3 · Issue #264 - GitHub
TLDR Transformers are poorly designed. I want to reimplement them but there will be breaking changes. Under this proposal, Zod 2 will never ......
Read more >Newest 'zod' Questions - Stack Overflow
I have a zod schema that transforms a string (enum) value into an object. I want to use it with react-hook-forms and the...
Read more >express-zod-api - npm
A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
Read more >Why Zod 2 isn't leaving beta - Colin McDonnell
Transformers are a mechanism within Zod to convert data from one type ... Zod can't know how to magically undo the transformation function....
Read more >Untitled
You must enable `strictNullChecks` or use `strict` mode which includes `strictNullChecks`. Otherwise Zod can't correctly infer the types of your schemas!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is the error log that I am getting.
Please open a new issue thank you