NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2943 most downloaded on npm
Decorator-based property validation for classes.
Last release 7 months ago
26 Feb 2026
Release timing varies
gaps range from 2 weeks to 1.3 years
Most releases are documented
notes for 34 of 44 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
62 releases · first in 2016
chore: publish 0.15.0 for real by @braaar in #2671
Full Changelog: v0.15.0...v0.15.1
build(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 by @dependabot [bot] in #2645
Full Changelog: v0.14.3...v0.14.4
One column per quarter.
build: update validator to 13.15.20 by @weikangchia in #2638
Full Changelog: v0.14.2...v0.14.3
fix: forbidUnknownValues should default true when validatorOptions undefined by @cduff in #2196
Full Changelog: v0.14.1...v0.14.2
fix: fail for non-array constraint in @IsIn decorator by @NoNameProvided in #1844
@IsIn decorator by @NoNameProvided in #1844@IsBase64 decorator by @NoNameProvided in #1845@IsUUID decorator by @NoNameProvided in #1846@IsPhoneNumber decorator to use max dataset by @NoNameProvided in #1857@IsNotEmptyObject decorator correctly by @arkist in #1555Note truncated.
@IsBase64 decorator (#1845) , closes #1013@IsUUID decorator (#1846) , closes #1497@IsPhoneNumber decorator to use max dataset (#1857)@IsIn decorator (#1844) , closes #1693@IsNotEmptyObject decorator correctly (#1555) , closes #1554libphonenumber-js to ^1.10.53 from ^1.10.14Nothing published for this version
> NOTE: This version fixes a security vulnerability allowing denial of service attacks with a specially crafted request payload.
NOTE: This version fixes a security vulnerability allowing denial of service attacks with a specially crafted request payload. Please update as soon as possible.
Array.isArray in array checks from instanceof operatorlibphonenumber-js package updated to 1.9.43 from 1.9.7validator package updated to 13.5.2 from 13.5.2optional mather function has been added to the ArrayUnique decorator
ArrayUnique decoratorIsUUID decoratorValidationError.toString() doesn't result in an error when forbidNonWhitelisted parameter was usedIsIn decorator@types/validator package is correctly installedinlineSources option is enabled in tsconfig preventing various sourcemap errors when consuming the packageproject is restructured to allow three-shaking
always - allows setting global default for always option for decoratorsstrictGroups - ignore decorators with at least one group, when ValidatorOptions.groups is emptymove tslib from peerDependencies to dependencies (827eff1), closes #588
apply only nested validator for ValidateNested multi-dimensional array
Nothing published for this version
accept negative timezone in isDateString (#564) (2012d72), closes #565
constraints property in ValidationError (#465) (84680ad), closes #309Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
IsNumber validator now works when maxDecimalPlaces=0
apply custom constraint class validation to each item in the array (#295) (5bb704e), closes #260
add default message for isMilitaryTime validator (#411) (204b7df), closes #287
add correct signature for custom error message handler
IsISO31661Alpha3 and IsISO31661Alpha2 validators (#273) (55c57b3)IsDecimal from validatorjs (#359) (b4c8e21)isPort decorator (#282) (36684ec)ValidatePromise decorator - resolve promise before validate (#369) (35ec04d)isNumberString now accept validator.js IsNumericOptions as second parameter (#262)Nothing published for this version
Nothing published for this version
added option to pass custom context for the decorators
updated [validator.js][validator-js] from 9.2.0 to 10.4.0 (Check it's [changelog][validator-js-release-notes] for what has changed.)
IsNumberString decorator, now they are allowed+ symbol, this is not allowed anymoreIsPhoneNumber decorator has been added which uses the [google-libphonenumber][google-libphonenumber] library to validate international phone numbers accuratelyIsURLOptions to match underlying validator host list optionsMin and Max decorator will corectly show an inclusive error message when failingvalidationArguments.value is not a stringremove ansicolor package, because it's incompatible with IE
ansicolor package, because it's incompatible with IEValidatorOptions now has a forbidUnknownValues key to prevent unknown objects to pass validation
ValidatorOptions now has a forbidUnknownValues key to prevent unknown objects to pass validation
false but will be default to true after the 1.0 releasehandle when target property is undefined when calling ValidationError.toString()
target property is undefined when calling ValidationError.toString()added ValidationError.toString() method for easier debugging
ValidationError.toString() method for easier debuggingprintError method to pretty-print errors in NodeJS or the browserValidatorOptionsValidationSchema (the options key now is optional)IsNumericString to IsNumberString in the READMEhost_whitelist and host_backlist in IsURLOptionsfixed wrong type info in ValidatorOptions
ValidatorOptionsThis caused breaking change, if you used the IsUrl decorator to validate localhost as a valid url, from now you must use the require_tld: false option
updated [validator.js][validator-js] from 7.0.0 to 9.2.0 (Check it's [changelog][validator-js-release-notes] for what has changed.)
This caused breaking change, if you used the IsUrl decorator to validate localhost as a valid url, from now you must use the require_tld: false option
@IsUrl({ require_tld: false})
url: string;
added @IsInstance decorator and validator.isInstance(value, target) method.
changed @IsNumber decorator 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 @Allow decorator to prevent stripping properties without other constraint
@IsDateString now it allow dates without fraction seconds to be set@IsDateString now it allow dates without with timezones to be set@ValidateNested correctly generates validation error on non object and non array valuesNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fixed issue with @ValidateNested when nested property is not defined and it throw an error \(\#59\)
@ValidateNested when nested property is not defined and it throw an error (#59)Nothing published for this version
fixed bugs with @IsUrl, @IsEmail and several other decorators
@IsUrl, @IsEmail and several other decoratorsadded @IsMilitaryTime decorator.
@IsMilitaryTime decorator.added validateOrReject method which rejects promise instead of returning array of errors in resolved result
validateOrReject method which rejects promise instead of returning array of errors in resolved resultNothing published for this version
#### Added - added @IsArray decorator.
@IsArray decorator.breaking change with @ValidateNested on arrays: Validator now groups the validation errors by sub-object, rather than them all being grouped together.…
@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.@ValidateIf decorator, see conditional validation in docs.Nothing published for this version
Nothing published for this version
there is a breaking change in registerDecorator method. Now it accepts options object.
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 with async: 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.
Nothing published for this version
Nothing published for this version
Nothing published for this version
fixed issue with wrong source maps packaged
everything should be imported from "class-validator" main entry point now
ValidatorInterface has been renamed to ValidatorConstraintInterfacevalidator.validateValidationError. Now if it has nested errors it does not return them in a flat arrayNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →