compare
class-validator vs Yup
The same facts for both, read from GitHub every night, and the relation a person reviewed.
| Fact | class-validator | Yup |
|---|---|---|
| Language | TypeScript | TypeScript |
| Licence | MIT | MIT |
| Stars | 12k | 24k |
| Latest | v0.15.1 | v1.0.0 |
| Last push | 2026-03-25 | 2026-11-22 |
| Release cadence | about 47 days between releases | too few 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 →
Partialclass-validatorValidation rules declared as decorators on TypeScript classes instead of a schema object.
Full replacementYupChained schema builders with validation and casting, for browsers and Node.js.
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
Yup
- v1.0.02023-02-08v1 Because I finally got around to it
- v1.0.0-beta.72022-08-22Fixes published artifacts for the main fieldpre-release
- v1.0.0-beta.52022-08-22v1.0.0-beta.5 - partial fixes and cast migration pathpre-release
- v1.0.0-beta.42022-08-22chore(deps): update all non-major dependenciespre-release
- v1.0.0-beta.32022-03-09Fix object.partial(), `required` changespre-release
class-validator
✓ signed The latest release, v0.15.1, carries a signature GitHub verified.
Loading the security report
Yup
unsigned The latest release, v1.0.0, carries no signature GitHub could verify.
Loading the security report