Enforce property requirements on drizzle-zod
password is an optional field,
shouldnt this make email and password required?
in the partial schema?
I have tried a couple of order different syntaxes with built in methods but nothing seem to work
6 Replies
according to docs:
does not work!
you can overwrite through merge/extend.
https://github.com/colinhacks/zod?tab=readme-ov-file#extend
GitHub
GitHub - colinhacks/zod: TypeScript-first schema validation with st...
TypeScript-first schema validation with static type inference - GitHub - colinhacks/zod: TypeScript-first schema validation with static type inference
also your methods works on mine
can you maybe send a screen of the schema self? i have nullable fields
since some columns were not required originally in the schema
imma try this out hope this works š
Ah required just drop undefined
U need to use overwrite with merge
Can you give me an example?
āļø