zod-express-middleware icon indicating copy to clipboard operation
zod-express-middleware copied to clipboard

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

Open devidw opened this issue 2 months ago • 0 comments

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

devidw avatar Apr 17 '24 10:04 devidw