Releases: express-validator/express-validator
Releases · express-validator/express-validator
v5.1.2
v5.1.1
v5.1.0
v5.0.3
- Don't set
undefined
values into request when validated key does not exist
v5.0.2
v5.0.1
v5.0.0
No more new features will be added to the legacy API! Only bug fixes will be accepted.
BREAKING CHANGES 💥
- #461 - check: sanitizers now persist the sanitized value back to the request. This was previously only the case for sanitizers used from the filter API
- #463 - check: standard validators will now use an array's first item only
@types/express
dependency removed; if you're using express, you must install this yourself now
New features ✨
- #433, #511, #512 - check: bring schema support back with new
checkSchema()
function - #445, #481, #516 - check, filter: add support for custom sanitizers via
.customSanitizer()
chain function - #466, #469, #489, #498 - check: accept dynamic message creator function in
.withMessage()
- #474 - check: add
validationResult.withDefaults()
which can create avalidationResult
function with default options set - check, filter: build custom
check
/sanitize
functions withbuildCheckFunction
orbuildSanitizeFunction
, respectively
Other changes 🐛
- #444 - check: make custom validators that resolve a promise succeed without needing to return a truthy value
- #458, #492 - check: partially fix wildcard issues with inexistent fields
- #414, #484 - docs: further describe when and how to use wildcards
- #462 - docs: add
.formatWith()
example - #483 - docs: fix locations accepted in
matchedData()
- #482 - filter: make
oneOf()
andmatchedData()
work together - #496 - Revamp TypeScript support in the library
- Update validator to v9.4.0