class-validator
https://github.com/typestack/class-validator
TypeScript
Decorator-based property validation for classes.
Triage Issues!
When you volunteer to triage issues, you'll receive an email each day with a link to an open issue that needs help in this project. You'll also receive instructions on how to triage issues.
Triage Docs!
Receive a documented method or class from your favorite GitHub repos in your inbox every day. If you're really pro, receive undocumented methods or classes and supercharge your commit history.
TypeScript not yet supported4 Subscribers
Add a CodeTriage badge to class-validator
Help out
- Issues
- fix: preserve distinct inherited validation constraints
- fix(Length): pick the violated bound when each: true
- fix: @Length with each: true on string[] reports wrong constraint in error message
- fix: `arrayUnique` is O(n²) and reports any array containing `NaN` as non-unique
- perf: improve ArrayUnique lookup performance
- fix(Length): don't reference unset constraint in error message
- feat: add IsMutuallyExclusiveWith decorator
- Security hardening: validateSync/validate inspect the live object ā read-unstable properties (getters/Proxy) can bypass validation
- fix: `getTargetValidationMetadatas` scans every registered class on each validation (O(N)), dominating CPU in large apps
- fix: reject enum member names in @IsEnum for numeric enums
- Docs
- TypeScript not yet supported