Skip to content

Releases: express-validator/express-validator

v6.3.1

29 Dec 11:01
Compare
Choose a tag to compare
  • #813 - don't use Symbol internally to avoid breaking express-validator reuse

v6.3.0

24 Nov 02:38
Compare
Choose a tag to compare
  • #476 - Bring notEmpty validator back
  • #772, #776 - Add missing pt-BR mobile phone locale
  • #794, #795 - Make all properties available in all union branches of ValidationError

v6.2.0

30 Aug 12:48
Compare
Choose a tag to compare
  • #500, #638, #751 - Bail validation when there's an error
  • #761 - Add min/max options to isArray() validator
  • #693, #742, #765 - Fix typing for optional when using checkSchema
  • #762 - Don't log a validation error when using .if() with another validation chain
  • #745 - Upgrade Lodash to fix vulnerability and validator to v11.1
  • #748 - Correct typo in a validator name in the docs

v6.1.1

01 Jul 21:58
Compare
Choose a tag to compare
  • #729 - Fix optional data being sanitized

v6.1.0

27 Jun 21:28
Compare
Choose a tag to compare
  • #439, #655, #658 - Conditional validation support
  • #625 - Improve field selection performance massively
  • #728, #731 - Fix imperative validations (await body('email').isEmail().run(req)) not generating any errors
  • #730, #733 - docs: some improvements to the "Running imperatively" page

v6.0.1

21 Jun 15:17
Compare
Choose a tag to compare
  • #726 - Fix TypeScript declarations incorrectly importing validator module

v6.0.0

20 Jun 14:31
Compare
Choose a tag to compare

BREAKING CHANGES πŸ’₯

  • Legacy APIs (req.check(), req.checkBody(), req.filter(), etc) have been removed;
  • require('express-validator/check') and require('express-validator/filter) are now deprecated. Instead, just use require('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 πŸ›

v5.3.1

23 Dec 23:32
Compare
Choose a tag to compare
  • #673 - check: add missing ; that would cause TypeScript to throw syntax errors

v5.3.0

23 Jul 15:26
Compare
Choose a tag to compare
  • #579 - docs: major overhaul, and a new home!
    See https://express-validator.github.io for them, with version selection available ✨
  • #473, #570 - check: add checkNull and checkFalsy options to exists validator
  • #568, #577 - filter: allow including optionals when using matchedData()
  • #584 - check: don't call sanitizers twice
  • #593 - check: don't fail when custom validator returns nothing
  • #598 - check: persist empty validations as the request location itself
  • Upgrade validator to v10.4.0

v5.2.0

07 May 23:49
Compare
Choose a tag to compare

express-validator has hit 3k stars 🌟 🌟 🌟 and is its own org 🏒 on GitHub!

  • #458, #531, #563 - check: fix wildcard field selection not validating every array entry
  • #564 - check: allow exists validator to have message set in schemas
  • #565 - check: persist values sanitized within oneOf()
  • Update validator to v10.1.0