Skip to content

Releases: express-validator/express-validator

v5.1.2

08 Apr 12:02
Compare
Choose a tag to compare
  • #431, #561 - Make toDate sanitizer and isISO8601 validators work well together
  • #554, #560 - filter: don't double sanitize data when using matchedData()

v5.1.1

05 Apr 16:38
Compare
Choose a tag to compare
  • #533, #536, #541, #559 - filter: fix matchedData interop with oneOf
  • #557 - typescript: remove no longer existing isDate validator

v5.1.0

30 Mar 09:39
Compare
Choose a tag to compare

New features ✨

  • #520 - check: whole body validation, like body().isUppercase()
  • #524 - check: add new standard validations like .isArray() and .isString()
  • check: implement validator negation when using schemas

Bug fixes 🐛

  • #542 - check: support sanitizers in checkSchema() TypeScript
  • #548 - check: report errors using original, unsanitized value
  • #548 - check: don't override validator messages from non-validators in schemas

v5.0.3

03 Mar 03:32
Compare
Choose a tag to compare
  • Don't set undefined values into request when validated key does not exist

v5.0.2

26 Feb 13:59
Compare
Choose a tag to compare
  • #521 - typescript: add standard sanitizers back to legacy's sanization chain interface

v5.0.1

17 Feb 12:40
Compare
Choose a tag to compare
  • #525, #528 - typescript: add exists to the schema definition

v5.0.0

10 Feb 13:35
Compare
Choose a tag to compare

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 a validationResult function with default options set
  • check, filter: build custom check/sanitize functions with buildCheckFunction or buildSanitizeFunction, 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() and matchedData() work together
  • #496 - Revamp TypeScript support in the library
  • Update validator to v9.4.0

v4.3.0

29 Oct 17:43
Compare
Choose a tag to compare
  • #434, #446 - check: accept subgroups of validations
  • #447, #453 - filter: list locations to get data from when using matchedData()
  • #441 - Add nullable option to .optional()

v4.2.2

30 Sep 00:20
Compare
Choose a tag to compare

⚠️ Incorrectly tagged version. Not published to npm.

v4.2.1

23 Sep 18:44
Compare
Choose a tag to compare
  • #425 - Don't sanitize non-string values