neurotech - Similar to the above, I have an inp...
Similar to the above, I have an
input
element with a type
of "number"
. How do I validate it's value as a number when using zod
4 in combination with react-hook-form
? z.coerce
's input type change to unknown
seems to have made this more difficult.Solution:Jump to solution
Indeed the same thing. Also same answer 😄 Either omit the genrics completely (
@hookform/resolvers
properly infers input/output now) or pass both input and output types5 Replies

Solution
Indeed the same thing. Also same answer 😄 Either omit the genrics completely (
@hookform/resolvers
properly infers input/output now) or pass both input and output typesAh that worked, I tried the solution from the other thread earlier but still had errors. Not sure what I did differently this time lol
I appreciate you replying, thanks mate
@janglad are you around?