Replies: 2 comments 8 replies
-
Please refer to the doc below: https://react-hook-form.com/api/useform/
|
Beta Was this translation helpful? Give feedback.
6 replies
-
Here is my solution:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version Number
7.43.7
Codesandbox/Expo snack
https://codesandbox.io/s/aged-architecture-z8dtdr?file=/src/App.tsx
Steps to reproduce
See codesandbox :)
Zod and react hook form are amazing libraries.
Context: If you use a resolver in your RHF all of your custom validation (inside the
controller
andregister
) is overwritten and not even applied.Use case: Numeric
min
/max
input for e.g. min/max price/amount etc.References:
Expected behaviour
My custom validation should overwrite (or extend) the zod resolver.
IF this is expected THEN we should hide the validation method from the
controller
/register
methods and make it clearer in the documentation.BUT I really think that this is a bug and should be resolved (would also be up for a PR but want to first understand the reasoning if there is any)
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions