fix(deps): update dependency class-validator to v0.14.2
This MR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| class-validator | 0.14.1 -> 0.14.2 |
⚠️ WarningSome dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
typestack/class-validator (class-validator)
v0.14.2
Fixed
- Fixed an issue where
forbidUnknownValuesdid not default totruewhenvalidatorOptionswas undefined. (#2196 by @cduff) - Fixed the
ValidationMetadata.nameproperty to work correctly with the@IsOptionaldecorator. (#2044 by @Clashsoft) - Updated the Codecov configuration for continuous integration. (#2556 by @haiweilian)
- Fixed an issue where options were not passed correctly to the
@IsBase64decorator. (#2549 by @aseyfpour) - Fixed argument handling for the
isBase64function. (#2574 by @braaar)
0.14.1 (2024-01-12)
Added
- allow specifying options for
@IsBase64decorator (#1845) , closes #1013 - use official type for version in
@IsUUIDdecorator (#1846) , closes #1497 - update
@IsPhoneNumberdecorator to use max dataset (#1857)
Fixed
- fail for non-array constraint in
@IsIndecorator (#1844) , closes #1693 - allow number and boolean values in validation message "$value" tokens (#1467) , closes #921, #1046
- read nullable option in
@IsNotEmptyObjectdecorator correctly (#1555) , closes #1554
Changed
- update
libphonenumber-jsto^1.10.53from^1.10.14 - update various dev-dependencies
0.14.0 (2022-12-09)
Added
- add
@IsTimeZonedecorator to check if given string is valid IANA time zone - add
@IsISO4217CurrencyCodedecorator to check if the string is an ISO 4217 currency code - add
@IsStrongPassworddecorator to check if given password matches specific complexity criteria - add
@IsBase58decorator to check if a string is base58 encoded - add
@IsTaxIddecorator to check if a given string is a valid tax ID in a given locale - add support for passing function as date generator in
@MinDateand@MaxDatedecorators - add option to print constraint error message instead of constraint type in validation error
- improve decorator metadata lookup performance
- return possible values in error message for
@IsEnumdecorator
Fixed
- re-added
@types/validatoras dependency - fix error generation when using
@NestedValidation - pass validation options correctly to validator in
@IsDateStringdecorator - support passing
Symbolas parameter in error message generation - specify supported locales for
@IsAlphanumericdecorator - correctly assign decorator name in metadata instead of loosing it
- fix various spelling errors in documentation
- fix various spelling errors and inconsistencies in JSDoc for decorators
Changed
- enable
forbidUnknownValuesoption by default - remove documentation about deprecated schema based validation and added warning
- update warning message logged about missing decorator metadata
- update
libphonenumber-jsto^1.10.14from^1.9.43 - update various dev-dependencies
BREAKING CHANGES
forbidUnknownValues option is enabled by default
From this release the forbidUnknownValues is enabled by default. This is the desired behavior for majority of
use-cases, but this change may break validation for some. The two scenarios that results in failed validation:
- when attempting to validate a class instance without metadata for it
- when using group validation and the specified validation group results in zero validation applied
The old behavior can be restored via specifying forbidUnknownValues: false option when calling the validate functions.
For more details see MR #1798 and #1422 (comment).
@NestedValidation decorator correctly assigns validation errors
Until now the errors from a nested validation in some cases were incorrectly assigned to the parent instead of the child being validated. Now the validation errors are correctly assigned.
For more details see #679.
0.13.2 (2021-11-20)
NOTE: This version fixes a security vulnerability allowing denial of service attacks with a specially crafted request payload. Please update as soon as possible.
Fixed
- switched to use
Array.isArrayin array checks frominstanceofoperator
Changed
-
libphonenumber-jspackage updated to1.9.43from1.9.7 -
validatorpackage updated to13.5.2from13.5.2 - various dev-dependencies updated
0.13.1 (2021-01-14)
Added
- optional mather function has been added to the
ArrayUniquedecorator
Fixed
- a typo was fixed in the error message generated by the
IsUUIDdecorator - calling
ValidationError.toString()doesn't result in an error whenforbidNonWhitelistedparameter was used - fixed typo in error message generated by
IsIndecorator - the
@types/validatorpackage is correctly installed -
inlineSourcesoption is enabled in tsconfig preventing various sourcemap errors when consuming the package
Changed
- various dev dependencies has been updated
0.13.0 (2021-01-11)
Added
- project is restructured to allow three-shaking
- added option to fail on first validation error (#620)
- two new validator option is added:
-
always- allows setting global default foralwaysoption for decorators -
strictGroups- ignore decorators with at least one group, whenValidatorOptions.groupsis empty
-
Fixed
- the 'any' locale is allowed in the
isPostalCodedecorator (#634) - the
IsDateString()decorator now aliases theIsISO8601()decorator (#672)
Changed
- project tooling has been updated significantly
- google-libphonenumber has been replaced with libphonenumber-js (this should have no effect on validation)
- build process generates include both ES/CommonJS and UMD variations
- various dev dependencies has been updated
0.12.2 (2020-04-23)
Fixed
0.12.1 (2020-04-18)
Fixed
- apply only nested validator for ValidateNested multi-dimensional array (c463be5)
0.12.0 (2020-04-18)
Fixed
- accept negative timezone in isDateString (#564) (2012d72), closes #565
- apply all decorators type PropertyDecorator (#556) (5fb36e3), closes #555
- avoiding metadataStorage from DI (#335) (b57fef4), closes #328 #261 #132
- correct registerDecorator options argument (7909ec6), closes #302
- IsNumberString accept isNumbericOptions as argument (62b993f), closes #518 #463
- optional
constraintsproperty in ValidationError (#465) (84680ad), closes #309 - pass context to ValidationError for async validations (#533) (4eb1216)
- switch isLatitude & isLongitude validators (#513) (5497179), closes #502
- switch isLatitude & isLongitude validators (#537) (c27500b)
- ValidateNested support multi-dimensional arrays (#539) (62678e1)
Changed
Added
BREAKING CHANGES
-
Validatorjs releases contain some breaking changes e.g.
IsMobileNumberorIsHexColor. Please check validatorjs CHANGELOG -
Validation functions was removed from
Validatorclass to enable tree shaking.BEFORE:
import { Validator } from 'class-validator'; const validator = new Validator(); validator.isNotIn(value, possibleValues); validator.isBoolean(value);AFTER:
import { isNotIn, isBoolean } from 'class-validator'; isNotIn(value, possibleValues); isBoolean(value); -
IsNumberString decorator arguments changed to
@IsNumberString(ValidatorJS.IsNumericOptions, ValidationOptions).
0.11.1 (2020-03-18)
Fixed
Added
- add all option in isuuid validator (#452) (98e9382)
- add IsFirebasePushId validator (#548) (e7e2e53)
- add options for isISO8601 validator (#460) (90a6638)
0.11.0 (2019-11-01)
Fixed
- create instance of ValidationError for whitelist errors (#434) (a98f5dd), closes #325
- pass context for isDefined and custom validators (#296) (0ef898e), closes #292
Added
- add isHash validator (#445) (c454cf9)
- add isISSN validator (#450) (4bd586e)
- add isJWT validator (#444) (874861b)
- add isMACAddress validator (#449) (45b7df7)
- add support for maxDecimalPlaces on IsNumber (#381) (a4dc10e)
BREAKING CHANGES
- update @types/validator from 11.1.0 to version 12.0.0 - please check it's changelog
0.10.2 (2019-10-14)
Fixed
Added
- add isLatLong, isLatitude, isLongtitude validators (#427) (3fd15c4), closes #415
- add IsObject and IsNotEmptyObject new decorators (#334) (0a41aeb)
- support ES6 Map and Set for regular validators with each option (#430) (a055bba), closes #428
0.10.1 (2019-09-25)
Fixed
- add default message for isMilitaryTime validator (#411) (204b7df), closes #287
- add default message for isPort validator (#404) (74e568c)
- add locale parameter for isAlpha and isAlphanumeric validat… (#406) (2f4bf4e)
Added
0.10.0 (2019-08-10)
Fixed
- add correct signature for custom error message handler (249c41d)
Added
- add
IsISO31661Alpha3andIsISO31661Alpha2validators (#273) (55c57b3) -
IsDecimal: implement
IsDecimalfrom validatorjs (#359) (b4c8e21) - add
isPortdecorator (#282) (36684ec) - allow validate Map/Set (#365) (f6fcdc5)
- new
ValidatePromisedecorator - resolve promise before validate (#369) (35ec04d) - replace instanceof Promise and support Promise/A+ (#310) (59eac09)
-
isNumberStringnow accept validator.jsIsNumericOptionsas second parameter (#262)
BREAKING CHANGES
- update @types/validator from 10.4.0 to version 10.11.2 - please check it's changelog (cb960dd)
-
isDateStringnow check to match only entire ISO Date (#275) (5012464) - remove
IsCurrencyOptions,IsURLOptions,IsEmailOptions,IsFQDNOptionsinterfaces and replace with interfaces from@types/validator
0.9.1
Added
- added option to pass custom context for the decorators
Fixed
- validating against a schema will validate against that one instead of every registered one
0.9.0 [BREAKING CHANGE]
Added
- updated validator.js from 9.2.0 to 10.4.0 (Check it's changelog for what has changed.)
- until now fractional numbers was not allowed in the
IsNumberStringdecorator, now they are allowed - until now Gmail addresses could contain multiple dots or random text after a
+symbol, this is not allowed anymore
- until now fractional numbers was not allowed in the
-
IsPhoneNumberdecorator has been added which uses the google-libphonenumber library to validate international phone numbers accurately
Fixed
- update
IsURLOptionsto match underlying validator host list options - added a console warning when no metadata decorator is found as it's possibly not intended
- the
MinandMaxdecorator will corectly show an inclusive error message when failing - fixed a runtime error when
validationArguments.valueis not a string
0.8.5
Fixed
- remove
ansicolorpackage, because it's incompatible with IE
0.8.4
Added
-
ValidatorOptionsnow has aforbidUnknownValueskey to prevent unknown objects to pass validation- it's highly advised to turn this option on
- now this option defaults to
falsebut will be default totrueafter the 1.0 release
0.8.3
Fixed
- handle when
targetproperty is undefined when callingValidationError.toString()
0.8.2
Added
- added
ValidationError.toString()method for easier debugging - added
printErrormethod to pretty-print errors in NodeJS or the browser
Fixed
- fixed wrong type info in
ValidatorOptions - fixed wrong type info in
ValidationSchema(theoptionskey now is optional) - corrected
IsNumericStringtoIsNumberStringin the README - fixed type of
host_whitelistandhost_backlistinIsURLOptions
0.8.1
Fixed
- fixed wrong type info in
ValidatorOptions
0.8.0 [BREAKING CHANGE]
Added
-
updated validator.js from 7.0.0 to 9.2.0 (Check it's changelog for what has changed.)
This caused breaking change, if you used the
IsUrldecorator to validatelocalhostas a valid url, from now you must use therequire_tld: falseoption@​IsUrl({ require_tld: false}) url: string; -
added
@IsInstancedecorator andvalidator.isInstance(value, target)method. -
changed
@IsNumberdecorator has been changed to@IsNumber(options: IsNumberOptions) -
added option to strip unknown properties (
whitelist: true) -
added option to throw error on unknown properties (
forbidNonWhitelisted: true) -
added
@Allowdecorator to prevent stripping properties without other constraint
Fixed
- fixed issue with
@IsDateStringnow it allow dates without fraction seconds to be set - fixed issue with
@IsDateStringnow it allow dates without with timezones to be set -
@ValidateNestedcorrectly generates validation error on non object and non array values
0.6.7
Fixed
- fixed issue with
@ValidateNestedwhen nested property is not defined and it throw an error (#59)
0.6.5
Fixed
- fixed bugs with
@IsUrl,@IsEmailand several other decorators
0.6.4
Added
- added
@IsMilitaryTimedecorator.
0.6.3
Added
- added
validateOrRejectmethod which rejects promise instead of returning array of errors in resolved result
0.6.1
Added
- added
@IsArraydecorator.
0.6.0 [BREAKING CHANGE]
Added
- breaking change with
@ValidateNestedon arrays: Validator now groups the validation errors by sub-object, rather than them all being grouped together. See #32 for a demonstration of the updated structure. - added
@ValidateIfdecorator, see conditional validation in docs.
0.5.0 [BREAKING CHANGE]
Added
-
async validations must be marked with
{ async: true }option now.This is optional, but it helps to determine which decorators are async to prevent their execution in
validateSyncmethod. -
added
validateSyncmethod that performs non asynchronous validation and ignores validations that marked withasync: true. -
there is a breaking change in
registerDecoratormethod. Now it accepts options object. -
breaking change with
@ValidatorConstraintdecorator. Now it accepts option object instead of single name.
0.4.1
Fixed
- fixed issue with wrong source maps packaged
0.4.0 [BREAKING CHANGE]
Added
- everything should be imported from "class-validator" main entry point now
-
ValidatorInterfacehas been renamed toValidatorConstraintInterface - contain can be set in the main entry point now
- some decorator's names changed. Be aware of this
- added few more non-string decorators
- validator now returns array of ValidationError instead of ValidationErrorInterface. Removed old ValidationError
- removed all other validation methods except
validator.validate - finally validate method is async now, so custom async validations are supported now
- added ability to validate inherited properties
- added support of separate validation schemas
- added support of default validation messages
- added support of special tokens in validation messages
- added support of message functions in validation options
- added support of custom decorators
- if no groups were specified, decorators with groups now are being ignored
- changed signature of the
ValidationError. Now if it has nested errors it does not return them in a flat array
Fixed
- fixed all decorators that should not work only with strings
0.3.0
Added
- package has changed its name from
validator.tstoclass-validator. - sanitation functionality has been removed from this library. Use class-sanitizer instead.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.