Zod Datestrings

To make zod only accept valid datestrings (YYYY-MM-DD), use:

const schema = z.object({
  date: z.string().pipe(z.coerce.date()),
})