Request validation with Zod in Express
Express does not validate request input for you. Without a check at the edge, handlers get raw req.body , req.query , and req.params - strings where…
Tech news from the best sources
Express does not validate request input for you. Without a check at the edge, handlers get raw req.body , req.query , and req.params - strings where…
Headline: Zod 4 is a rewrite of the TypeScript-first schema validation library, released as the stable major in 2025. Four changes hit my code direc…
Lets start with a code example: import { pool , sql } from " ./db.js " ; import { z } from " zod " ; const getUser = ( id : number ) => { return…
If you're using Zod with react-hook-form, you've probably seen this at least once: Invalid input: expected number, received NaN At first glance, it…
Работая с формой, часто нам нужно сделать так, чтобы на вход она принимала данные одного типа, а после валидации их тип меняется Моя форма состоит и…
If you use Prisma, you already know it's a fantastic ORM with excellent developer experience. But there's a common friction point almost all of us h…