Skip to content
Discussion options

You must be logged in to vote

Using coerce will lead to an input type of unknown and an output type of number. The schema will have different input and output types, which you can get with z.input<> and z.output<>. You can provide three generics to useForm (TFieldValues, TContext, TTransformedValues) or allow them to be inferred from the zodResolver.

See this TypeScript playground.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mr-luis15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants