Socket
Socket
Sign inDemoInstall

class-validator

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-validator - npm Package Versions

1
45

0.4.0

Diff

Changelog

Source

0.4.0 [BREAKING CHANGE]

Added
  • everything should be imported from "class-validator" main entry point now
  • ValidatorInterface has been renamed to ValidatorConstraintInterface
  • 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
pleerock
published 0.4.0-alpha.4 •

pleerock
published 0.4.0-alpha.3 •

pleerock
published 0.4.0-alpha.2 •

pleerock
published 0.4.0-alpha.1 •

pleerock
published 0.3.2 •

pleerock
published 0.3.1 •

pleerock
published 0.3.0 •

Changelog

Source

0.3.0

Added
  • package has changed its name from validator.ts to class-validator.
  • sanitation functionality has been removed from this library. Use [class-sanitizer][class-sanitizer] instead.
1
45
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc