express-validator/express-validator (express-validator)
### [`v7.2.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.2.0)
[Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.1.0...v7.2.0)
- Add `hide()` method ([#1304](https://togithub.com/express-validator/express-validator/issues/1304), [#1305](https://togithub.com/express-validator/express-validator/issues/1305))
- Add wildcard values to custom validator's metadata ([#1297](https://togithub.com/express-validator/express-validator/issues/1297), [#1308](https://togithub.com/express-validator/express-validator/issues/1308))
- Correctly select properties of primitives ([#1245](https://togithub.com/express-validator/express-validator/issues/1245), [#1279](https://togithub.com/express-validator/express-validator/issues/1279))
### [`v7.1.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.1.0)
[Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.0.1...v7.1.0)
- Upgraded validator to v13.12.0 (see their release notes: https://github.com/validatorjs/validator.js/releases/tag/13.12.0)
- Added missing fields to `IsURLOptions` ([#1258](https://togithub.com/express-validator/express-validator/issues/1258), [#1259](https://togithub.com/express-validator/express-validator/issues/1259))
- Added `isULID()` validator ([#1248](https://togithub.com/express-validator/express-validator/issues/1248))
- Several improvements to docs
### [`v7.0.1`](https://togithub.com/express-validator/express-validator/releases/tag/v7.0.1)
[Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.0.0...v7.0.1)
- Fixed `checkSchema()` warning that known validators are unknown when its value is `false` - [#1223](https://togithub.com/express-validator/express-validator/issues/1223)
### [`v7.0.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.0.0)
[Compare Source](https://togithub.com/express-validator/express-validator/compare/v6.15.0...v7.0.0)
π π **First major version in almost 4 years!** π π€―
Thanks everybody for having the patience. Hopefully this version brings many improvements to your developer experience!
#### Breaking changes π₯
- **Minimum supported Node.js version is now 14+**
- Removed deprecated APIs - [#993](https://togithub.com/express-validator/express-validator/issues/993)
- Import paths `express-validator/check` and `express-validator/filter`
- Sanitization-only middlewares (e.g. `sanitize()`, `sanitizeBody()`, etc)
- Deprecated TypeScript types (`ValidationParamSchema` and `ValidationSchema`)
- `isObject()` validator now assumes `options.strict = true` by default
- Validation errors changed shape
- Field validation errors `param` property has been renamed to `path`
- `oneOf()` validation errors no longer have a `param: '_error'` property
- (TypeScript only) The `ValidationError` type is now a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), it might be necessary to use `switch` or `if` statements to check that you're dealing with the type that you want to debug/format
- `oneOf()` signature changed: from `oneOf(chains, message)` to `oneOf(chains, options: { message, errorType })`
- `oneOf()` default error structure now groups errors by their... validation group!, instead of in a flat list
Checkout the migration guide for examples on how to work around some of these:
https://express-validator.github.io/docs/migration-v6-to-v7
#### New features β¨
- **Added validation for no unknown fields** - [#558](https://togithub.com/express-validator/express-validator/issues/558), [#578](https://togithub.com/express-validator/express-validator/issues/578), [#612](https://togithub.com/express-validator/express-validator/issues/612), [#1148](https://togithub.com/express-validator/express-validator/issues/1148), [#809](https://togithub.com/express-validator/express-validator/issues/809), [#927](https://togithub.com/express-validator/express-validator/issues/927), [#1204](https://togithub.com/express-validator/express-validator/issues/1204)
- **Added globstars (deep wildcard) support** - [#790](https://togithub.com/express-validator/express-validator/issues/790), [#1137](https://togithub.com/express-validator/express-validator/issues/1137), [#1216](https://togithub.com/express-validator/express-validator/issues/1216)
- Added support for multiple custom validators/sanitizers in `checkSchema()` - [#552](https://togithub.com/express-validator/express-validator/issues/552), [#1180](https://togithub.com/express-validator/express-validator/issues/1180)
- Added request-level bail - [#1100](https://togithub.com/express-validator/express-validator/issues/1100), [#1214](https://togithub.com/express-validator/express-validator/issues/1214)
- Added a `ExpressValidator` class which allows adding "persistent" custom validators, sanitizers, and options - [#1077](https://togithub.com/express-validator/express-validator/issues/1077), [#1079](https://togithub.com/express-validator/express-validator/issues/1079), [#1209](https://togithub.com/express-validator/express-validator/issues/1209)
- Added `oneOf()` support to `.if()` - [#1170](https://togithub.com/express-validator/express-validator/issues/1170)
- Added new error types to `oneOf()` - [#956](https://togithub.com/express-validator/express-validator/issues/956), [#1022](https://togithub.com/express-validator/express-validator/issues/1022)
#### Bug fixes π
- **Validating/sanitizing arrays no longer drops all but the first value** - [#791](https://togithub.com/express-validator/express-validator/issues/791), [#755](https://togithub.com/express-validator/express-validator/issues/755), [#704](https://togithub.com/express-validator/express-validator/issues/704), [#1002](https://togithub.com/express-validator/express-validator/issues/1002)
- Added missing `ko-KR` to `MobilePhoneLocale` - [#1218](https://togithub.com/express-validator/express-validator/issues/1218), [#1219](https://togithub.com/express-validator/express-validator/issues/1219)
- Don't silently fail when setting `withMessage` and `not` in schemas - [#664](https://togithub.com/express-validator/express-validator/issues/664)
#### New Contributors
- [@Yoowatney](https://togithub.com/Yoowatney) made their first contribution in [https://github.com/express-validator/express-validator/pull/1219](https://togithub.com/express-validator/express-validator/pull/1219)
**Full Changelog**: https://github.com/express-validator/express-validator/compare/v6.15.0...v7.0.0
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
^6.3.1
->^7.0.0
Release Notes
express-validator/express-validator (express-validator)
### [`v7.2.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.2.0) [Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.1.0...v7.2.0) - Add `hide()` method ([#1304](https://togithub.com/express-validator/express-validator/issues/1304), [#1305](https://togithub.com/express-validator/express-validator/issues/1305)) - Add wildcard values to custom validator's metadata ([#1297](https://togithub.com/express-validator/express-validator/issues/1297), [#1308](https://togithub.com/express-validator/express-validator/issues/1308)) - Correctly select properties of primitives ([#1245](https://togithub.com/express-validator/express-validator/issues/1245), [#1279](https://togithub.com/express-validator/express-validator/issues/1279)) ### [`v7.1.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.1.0) [Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.0.1...v7.1.0) - Upgraded validator to v13.12.0 (see their release notes: https://github.com/validatorjs/validator.js/releases/tag/13.12.0) - Added missing fields to `IsURLOptions` ([#1258](https://togithub.com/express-validator/express-validator/issues/1258), [#1259](https://togithub.com/express-validator/express-validator/issues/1259)) - Added `isULID()` validator ([#1248](https://togithub.com/express-validator/express-validator/issues/1248)) - Several improvements to docs ### [`v7.0.1`](https://togithub.com/express-validator/express-validator/releases/tag/v7.0.1) [Compare Source](https://togithub.com/express-validator/express-validator/compare/v7.0.0...v7.0.1) - Fixed `checkSchema()` warning that known validators are unknown when its value is `false` - [#1223](https://togithub.com/express-validator/express-validator/issues/1223) ### [`v7.0.0`](https://togithub.com/express-validator/express-validator/releases/tag/v7.0.0) [Compare Source](https://togithub.com/express-validator/express-validator/compare/v6.15.0...v7.0.0) π π **First major version in almost 4 years!** π π€― Thanks everybody for having the patience. Hopefully this version brings many improvements to your developer experience! #### Breaking changes π₯ - **Minimum supported Node.js version is now 14+** - Removed deprecated APIs - [#993](https://togithub.com/express-validator/express-validator/issues/993) - Import paths `express-validator/check` and `express-validator/filter` - Sanitization-only middlewares (e.g. `sanitize()`, `sanitizeBody()`, etc) - Deprecated TypeScript types (`ValidationParamSchema` and `ValidationSchema`) - `isObject()` validator now assumes `options.strict = true` by default - Validation errors changed shape - Field validation errors `param` property has been renamed to `path` - `oneOf()` validation errors no longer have a `param: '_error'` property - (TypeScript only) The `ValidationError` type is now a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), it might be necessary to use `switch` or `if` statements to check that you're dealing with the type that you want to debug/format - `oneOf()` signature changed: from `oneOf(chains, message)` to `oneOf(chains, options: { message, errorType })` - `oneOf()` default error structure now groups errors by their... validation group!, instead of in a flat list Checkout the migration guide for examples on how to work around some of these: https://express-validator.github.io/docs/migration-v6-to-v7 #### New features β¨ - **Added validation for no unknown fields** - [#558](https://togithub.com/express-validator/express-validator/issues/558), [#578](https://togithub.com/express-validator/express-validator/issues/578), [#612](https://togithub.com/express-validator/express-validator/issues/612), [#1148](https://togithub.com/express-validator/express-validator/issues/1148), [#809](https://togithub.com/express-validator/express-validator/issues/809), [#927](https://togithub.com/express-validator/express-validator/issues/927), [#1204](https://togithub.com/express-validator/express-validator/issues/1204) - **Added globstars (deep wildcard) support** - [#790](https://togithub.com/express-validator/express-validator/issues/790), [#1137](https://togithub.com/express-validator/express-validator/issues/1137), [#1216](https://togithub.com/express-validator/express-validator/issues/1216) - Added support for multiple custom validators/sanitizers in `checkSchema()` - [#552](https://togithub.com/express-validator/express-validator/issues/552), [#1180](https://togithub.com/express-validator/express-validator/issues/1180) - Added request-level bail - [#1100](https://togithub.com/express-validator/express-validator/issues/1100), [#1214](https://togithub.com/express-validator/express-validator/issues/1214) - Added a `ExpressValidator` class which allows adding "persistent" custom validators, sanitizers, and options - [#1077](https://togithub.com/express-validator/express-validator/issues/1077), [#1079](https://togithub.com/express-validator/express-validator/issues/1079), [#1209](https://togithub.com/express-validator/express-validator/issues/1209) - Added `oneOf()` support to `.if()` - [#1170](https://togithub.com/express-validator/express-validator/issues/1170) - Added new error types to `oneOf()` - [#956](https://togithub.com/express-validator/express-validator/issues/956), [#1022](https://togithub.com/express-validator/express-validator/issues/1022) #### Bug fixes π - **Validating/sanitizing arrays no longer drops all but the first value** - [#791](https://togithub.com/express-validator/express-validator/issues/791), [#755](https://togithub.com/express-validator/express-validator/issues/755), [#704](https://togithub.com/express-validator/express-validator/issues/704), [#1002](https://togithub.com/express-validator/express-validator/issues/1002) - Added missing `ko-KR` to `MobilePhoneLocale` - [#1218](https://togithub.com/express-validator/express-validator/issues/1218), [#1219](https://togithub.com/express-validator/express-validator/issues/1219) - Don't silently fail when setting `withMessage` and `not` in schemas - [#664](https://togithub.com/express-validator/express-validator/issues/664) #### New Contributors - [@Yoowatney](https://togithub.com/Yoowatney) made their first contribution in [https://github.com/express-validator/express-validator/pull/1219](https://togithub.com/express-validator/express-validator/pull/1219) **Full Changelog**: https://github.com/express-validator/express-validator/compare/v6.15.0...v7.0.0Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.