Back to Explore

typestack/class-validator

GitHub
1 watchersOpen source

Last release:

class-validator provides decorator-based and non-decorator validation for TypeScript classes, letting you define validation rules on properties and validate instances. It works in both browser and node.js environments and performs validation internally using validator.js.

Project status

  • Active maintenance: The repository shows recent upstream activity (last push 2026-03-25), and the package has had functional updates in late Feb 2026, indicating the project is not abandoned.
  • Update cadence: There were multiple updates close together (v0.14.4 on 2026-02-25, v0.15.0 and v0.15.1 on 2026-02-26), but there are no further update summaries provided after late Feb and upstream activity stops at 2026-03-25, so the pace looks periodic rather than rapid as of 2026-08-12.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v0.15.0

    v0.15.0 adds several new validation decorators for standardized codes (country numeric, language codes), extends UUID validation capabilities, and introduces `validateIf` support for validation options. It also updates `IsIBAN` to accept `IsIBANOptions`, which is marked as a breaking change, and includes a dependency vulnerability bump.

    BreakingSecurityFeatures
  • v0.15.1

    The provided release notes for v0.15.1 contain only chore entries about publishing 0.15.0 and 0.15.1, with no mention of functional changes. The actual code diff introduces new validator capabilities and multiple API signature changes that are not reflected in the release notes content.

  • v0.14.4

    Release v0.14.4 primarily updates dependency versions and bumps the package version from 0.14.3 to 0.14.4. The release notes call out a validator.js bump and a js-yaml bump, and the code diff shows those plus additional lockfile-driven js-yaml changes.

  • v0.14.3

    v0.14.3 primarily bumps the underlying validator.js dependency to address a reported vulnerability. The code diff also shows minor internal refactoring around how the IsRgbColor validator is called, plus test expectation changes consistent with modified validation behavior in validator.js.

    Security
  • v0.14.2

    v0.14.2 primarily fixes validation behavior around unknown objects, ensuring forbidUnknownValues defaults to true when no validatorOptions are provided. It also corrects metadata handling for @IsOptional and fixes @IsBase64 so decorator options are actually passed into the underlying isBase64 validator, plus some CI/coverage configuration updates.

    Breaking
  • v0.14.1

    class-validator v0.14.1 includes several targeted fixes and enhancements to specific decorators (notably @IsIn, @IsBase64, @IsUUID, @IsPhoneNumber) plus many dependency bumps. It also changes validation message token handling to allow $value to be replaced with non-string primitives.

    Features
  • v0.14.0

    v0.14.0 introduces several new validation decorators (for example, IsStrongPassword, IsTimeZone, IsBase58) and broad internal updates across existing decorators. The code diff also shows widespread refactors to how decorator constraint arguments are read, plus a notable change to date decorators to support providing date generator functions.

    Features
  • v0.13.2

    Release v0.13.2 does not include publisher release notes in the provided data. The code diff shows a broad internal change to how the library detects arrays (switching from instanceof Array to Array.isArray), along with dependency version bumps and some tooling/workflow adjustments.

  • v0.13.1

    No release notes were provided for v0.13.1. The code changes mainly add functionality to the ArrayUnique decorator, adjust validation error stringification, introduce a debug warning option, and bump core dependencies.

    BreakingFeatures
  • v0.13.0

    Release v0.13.0 was published on 2021-01-11, but the publisher did not provide any release notes in the provided data. As a result, there is no documented information about new features, breaking changes, bug fixes, security updates, or migration steps for this version.