How to use strongly-typed formOptions?
#1008
-
|
I'm following the App Router integration docs. I want to use my zod schema on both server and client, which the docs don't demonstrate 🙇. I'm passing When I try adding a Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It's not something specific to formOptions/nextjs as it follows the same typings of useForm: if you specify the type and you have a validatorAdapter you should also specify that on the types.
It should probably be explicitly mentioned in the adapters section in the docs, I'll take care of that. |
Beta Was this translation helpful? Give feedback.
It's not something specific to formOptions/nextjs as it follows the same typings of useForm: if you specify the type and you have a validatorAdapter you should also specify that on the types.
formOptions<TaskFormData, ZodValidator>should do the trick :)It should probably be explicitly mentioned in the adapters section in the docs, I'll take care of that.