#Zod conditional fields
1 messages · Page 1 of 1 (latest)
You'd probably need two different Zod schemas, where some of the fields are marked with .optional() right?
Two different schema with two différents actions?
You could do two different schemas. Or you can make a base schema for all the required fields and then conditionally merge schema for specific use cases.