3 ms·
We use drizzle + Hono + client with zod. So the entire chain from ui to client to server to DB follow same validation and shape.
by blackoil 1y ago
We use drizzle + Hono + client with zod. So the entire chain from ui to client to server to DB follow same validation and shape.
- causal 1y agoI've heard of this stack, glad to hear it works, still hate that you need three separate external dependencies to do it
- dalmo3 1y agoHow 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.