1 Reply
I wrote a post on wrappers to use Zod to do input validation, that give you the right types on the client and validated input on the server using a
withZod
wrapper inside your convex functions: https://stack.convex.dev/wrappers-as-middleware-zod-validationZod Validation: Wrappers as “Middleware”
Function validation is important for a production app because you can’t always control which clients are talking to your server. See how to use zod to...