Preparing for system design interviews?  Try bugzed.com →

Express Middleware for Request Validation and Transformation

JSON →
library 1.10.4 ·javascript maintenance
verified Jun 17, 2026

dat-middleware is an Express.js middleware library that provides a fluent and declarative API for common request data operations. It focuses on validating and transforming `req.body`, `req.query`, and `req.params` against various criteria such as required fields, data types (string, number, array, boolean, object, function), specific class instances (`instanceOf`), and regular expressions (`matches`). Developers can also integrate custom validation logic using the `validate()` method. Upon validation failure, the middleware automatically calls `next()` with a 400 Bad Request error object generated by `spumko/boom`, simplifying error handling. The current stable version is 1.10.4. Given its last update several years ago, it operates primarily in a maintenance mode, offering a stable but not actively developed solution for Express input validation. Its key differentiator is the chaining syntax for defining validation rules directly within the middleware stack.

total hits 17
actors 5 distinct systems
last hit 17d ago AhrefsBot
GPTBot
4
Amazonbot
4
ByteDance
2
Script
1
Humans
3

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇩🇪 Germany