How to use a numeric input with controller + zod resolver #6120
Unanswered
kevinmitch14
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How have people been dealing with numeric inputs Eg: age.
I don't want to add a defaultValue of something like 0, because then this is the value that shows up when the form renders.
Adding no defaultValue results in the uncontrolled to controlled warning.
Also a bit of a pain using a string because you lose some nice zod stuff,
z.number().gt(12)
etcBeta Was this translation helpful? Give feedback.
All reactions