- updated validator.js from 7.0.0 to 9.2.0 (Check it's changelog for what has changed.)
- fixed issue with
@IsDateString
now it allow dates without fraction seconds to be set - fixed issue with
@IsDateString
now it allow dates without with timezones to be set
- fixed issue with
@ValidateNested
when nested property is not defined and it throw an error (#59)
no new features in this release
- fixed bugs with
@IsUrl
,@IsEmail
and several other decorators
- added
@IsMilitaryTime
decorator.
no fixes in this release.
- added
validateOrReject
method which rejects promise instead of returning array of errors in resolved result
no fixes in this release.
- added
@IsArray
decorator.
no fixes in this release.
- breaking change with
@ValidateNested
on 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
@ValidateIf
decorator, see conditional validation in docs.
no fixes in this release.
-
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
validateSync
method. -
added
validateSync
method that performs non asynchronous validation and ignores validations that marked withasync: true
. -
there is a breaking change in
registerDecorator
method. Now it accepts options object. -
breaking change with
@ValidatorConstraint
decorator. Now it accepts option object instead of single name.
no fixes in this release.
no new features in this release
- fixed issue with wrong source maps packaged
- everything should be imported from "class-validator" main entry point now
ValidatorInterface
has 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 all decorators that should not work only with strings
- package has changed its name from
validator.ts
toclass-validator
. - sanitation functionality has been removed from this library. Use class-sanitizer instead.
no fixes in this release.