CyberHero36
TTCTheo's Typesafe Cult
•Created by CyberHero36 on 6/16/2024 in #questions
How do I merge two Zod schemas?
Hey guys, I am creating a form with react-hook-form and Zod. The form was too long, so I decided to divide it into multi step form, with each step having separate Zod schema. I am storing the form data locally until all steps are complete. Now, I want a Zod schema for combining the schemas and perform a validation before I send the data to the server. I am unable to find the right solution. Can somebody please help me?
7 replies