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 workingSolution:Jump to 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
1 Reply
Solution
you can use
z.coerce.date()
zod will parse your input to Date
https://zod.dev/?id=coercion-for-primitivesGitHub
TypeScript-first schema validation with static type inference
TypeScript-first schema validation with static type inference