Replies: 1 comment
-
This is possible with build validation, however with disabled input schema will still receive the entire form values, you may want to keep an extra state with disabled input and send the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using RHF and the zod resolver. Zod assumes that all schema values are required by default. I was hoping the rhf resolver could somehow override that when a field is not required, or is disabled.
I've tried applying both attributes to the
input
itself as well as theregister
function, but neither work.Is there a way I can get rhf/zod to ignore the validation if a field is not required and empty, or it's disabled?
Beta Was this translation helpful? Give feedback.
All reactions