Zod and Convex type error
Hello,
I'm using Zod to validate my forms.
When I pass the form data to a mutation function, I got a type error.
The function expect some convex ids and the zod schema is a simple string.
What is the fix here?
Zod Schema
Expecting
Error
3 Replies
I think I found the solution
Zod with TypeScript for Server-side Validation and End-to-End Types
Use Zod with TypeScript for argument validation on your server functions allows you to both protect against invalid data, and define TypeScript types ...
Thank you @ian!