5 ms·
How do you use the same validation for drizzle and zod? I have been writing duplicate schemas and hoping they match...
by dalmo3 1y ago
How do you use the same validation for drizzle and zod? I have been writing duplicate schemas and hoping they match...
- blackoil 1y agoDrizzle has a zod addon, to generate zod schema from table defn. So table defn is source of truth, we mix generated zod schemas to get hono request validators. Same zod schema are also used on client to validate forms.