v6.0.0
版本发布时间: 2019-06-20 22:31:00
express-validator/express-validator最新发布版本:v7.2.0(2024-08-11 18:37:16)
BREAKING CHANGES 💥
-
Legacy APIs (
req.check()
,req.checkBody()
,req.filter()
, etc) have been removed; -
require('express-validator/check')
andrequire('express-validator/filter)
are now deprecated. Instead, just userequire('express-validator')
; - #616, #722 - Validators and sanitizers will now run in the order they are specified, instead of always running sanitizers first, then validators;
- #592, #641, #632, #630, #580, #651, #711 - non-string values will now be sanitized;
- Node.js version 6 is no longer supported. Use version 8 or newer.
New features ✨
- #698 - express-validator is now written in TypeScript!
- #407 - express-validator now works with other libraries like Restify or similar;
- #679, #713 - Add a
toArray()
sanitizer; - Validations can now be run imperatively with
check('field').run(req)
. See docs.
Other changes 🐛
- #590, #620, #643, #645, #706, #712 - Overall better docs
- #572, #573, #691 - Don't reject promises with non-
Error
- #723 - Update validator to v11.0.0