compare
Ajv vs class-validator
The same facts for both, read from GitHub every night, and the relation a person reviewed.
| Fact | Ajv | class-validator |
|---|---|---|
| Language | TypeScript | TypeScript |
| Licence | MIT | MIT |
| Stars | 15k | 12k |
| Latest | v8.20.0 | v0.15.1 |
| Last push | 2026-09-06 | 2026-03-25 |
| Release cadence | about 35 days between releases | about 47 days between releases |
| Active contributors | 0 commit authors on the default branch in the last 90 days | 0 commit authors on the default branch in the last 90 days |
| Flags | none | none |
How they relate
Both replace Joi. Alternatives to Joi →
PartialAjvValidates against JSON Schema documents instead of a builder API.
Partialclass-validatorValidation rules declared as decorators on TypeScript classes instead of a schema object.
Ajv
- v8.20.02026-04-24fix: add support for node 22/24, drop node 16/21
- v8.19.02026-04-24fix prototype pollution via format keyword using $data ref
- v8.18.02026-02-14feat: allow tree-shaking by adding "sideEffects": false to package.json
- v8.17.12024-07-12bump version to 8.17.1
- v8.17.02024-07-10The only functional change is to switch from uri-js (which is no longer supported), to fast-uri. This is the second att…
class-validator
- v0.15.12026-02-26chore: publish 0.15.0 for real
- v0.15.02026-02-26feat: add IsISO31661Numeric decorator for country codes
- v0.14.42026-02-25build(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 by @dependabot[bot] in
- v0.14.32025-11-24build: update validator to 13.15.20
- v0.14.22025-05-02fix: forbidUnknownValues should default true when validatorOptions undefined
Ajv
✓ signed The latest release, v8.20.0, carries a signature GitHub verified.
Loading the security report
class-validator
✓ signed The latest release, v0.15.1, carries a signature GitHub verified.
Loading the security report