Aquila169 / zod-express-middleware

Express middleware to validate requests using zod schema's.
MIT License
82 stars 13 forks source link

it should be noted that for POST body schema you need express.json() #17

Open devidw opened 3 months ago

devidw commented 3 months ago
import express from "express"
import { z } from "zod"

const expressApp = express()

expressApp.use(express.json())

otherwise POST body req validation will not work

in the readme there are only GET examples