Express middleware for validating request inputs (body, query, params, headers) using any library that implements Standard Schema V1. Current stable version: 0.2.3. Release cadence: infrequent, early-stage. Key differentiators: multi-library support (Joi, Zod, ArkType, Valibot), TypeScript-first, value replacement with original value retention in req.original*. Requires Node >=20 and Express >=4.0.0. Derived from express-joi-validation but generalized for Standard Schema. Configurable per-route or globally with passError, statusCode, and custom error templates.
npm install express-standard-schema-validationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows ESM import, createValidator, Zod schema validation, and value replacement of req.body.
If you need the original raw input, use req.originalBody, req.originalQuery, etc.
Upgrade to Express 4.x or later.
Use schema methods like .required(), .min(), etc. to configure validation.
Upgrade Node.js to version 20 or higher.
Ensure your validation library version implements Standard Schema V1. Tested with recent versions of Zod, Joi, ArkType, Valibot.
Use `import { createValidator } from 'express-standard-schema-validation'` (named import).Run `npm install express`.
Check that the request body/query/params contain all required fields as defined in the schema.
Call `const validator = createValidator();` then use `validator.query(schema)`.