Z
Zod5mo ago
EagleV

EagleV - hi, how can I test zod z.date() using ...

hi, how can I test zod z.date() using postman? I've tried to pass a ISO date like 2024-08-01T12:00:00Z but it's not working
Solution:
you can use z.coerce.date() zod will parse your input to Date https://zod.dev/?id=coercion-for-primitives...
GitHub
TypeScript-first schema validation with static type inference
TypeScript-first schema validation with static type inference
Jump to solution
1 Reply
Solution
EagleV
EagleV5mo ago
you can use z.coerce.date() zod will parse your input to Date https://zod.dev/?id=coercion-for-primitives
GitHub
TypeScript-first schema validation with static type inference
TypeScript-first schema validation with static type inference
Want results from more Discord servers?
Add your server