Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

class-validator

Decorator-based property validation for classes with TypeScript support.

Forms, validation and schemasNPM

GitHubWebsite

1. License

License from npm.

github.com/typestack/class-validator

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What class-validator does

Decorator-based property validation for classes with TypeScript support.

class-validator popularity

67 / 100
Gid Score, #523 overall
18.2M
downloads a week, npm
11.9K
GitHub stars
16
agent projects use it
class-validator: downloads per weeknpm, class-validator 18,195,537
class-validator: GitHub starstypestack/class-validator 11,856

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How class-validator is used

  • class-validator is a dependency in 16 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 73 projects, and what it is used with below comes from all of them.
  • The most used alternative in our scan is Zod (1,582 projects).
  • Projects that use it most often also use class-transformer (90.4%), NestJS (86.3%), RxJS (80.8%).

By coding agent

13 projects, 0.4%
8 projects, 0.3%
6 projects, 0.2%

Often used with

In 90.4% of its projects
In 86.3% of its projects
In 80.8% of its projects
In 79.5% of its projects
In 79.5% of its projects
In 74.0% of its projects
In 65.8% of its projects
In 64.4% of its projects

More about class-validator

More in Forms, validation and schemas

Alternatives

class-validator This page

MITGid 6718.2M/wk

Zod

TypeScript-first schema validation library with static type inference.

MITGid 89471M/wk

Ajv

Fast JSON Schema validator for runtime schema validation and serialization.

MITGid 78547M/wk

Valibot

Modular and type-safe schema validation library for structural data with minimal bundle size.

MITGid 6836M/wk

TypeBox

JSON Schema type builder with static type resolution for TypeScript validation.

MITGid 5817M/wk

Yup

Simple schema validation library for JavaScript with chainable API and error handling.

MITGid 6916.6M/wk

Compare class-validator with another tool

Get started

Install it.

npm install class-validator

No step-by-step start for class-validator yet: we have not written its hand-checked card.