🌐
GitHub
github.com › typestack › class-validator
GitHub - typestack/class-validator: Decorator-based property validation for classes. · GitHub
Allows use of decorator and non-decorator based validation. Internally uses validator.js to perform validation. Class-validator works on both browser and node.js platforms.
Author   typestack
🌐
NestJS
docs.nestjs.com › techniques › validation
Validation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
🌐
Sonicar
class-validator.sonicar.tech
Class Validator Documentation
Class-validator is a powerful validation library for TypeScript and JavaScript that allows you to use decorator and non-decorator based validation.
🌐
Medium
medium.com › @ahureinebenezer › mastering-data-validation-in-nestjs-a-complete-guide-with-class-validator-and-class-transformer-02a029db6ecf
Mastering Data Validation in NestJS: A Complete Guide with Class-Validator and Class-Transformer | by Ahurein Ebenezer | Medium
March 29, 2025 - Our simple class has grown in size, we have annotated the fields with decorators from Class-Validator. These decorators apply validation rules to the fields. You may have questions about the decorators if you are new to this. For example, what do they mean?
🌐
DEV Community
dev.to › yantrab › dont-use-class-validator-in-nestjs-2i6h
Why you should not use class-validator in NestJS! - DEV Community
June 30, 2022 - There is no validation - you can test this by sending a string in the locationId param - http://localhost:3000/events/some-string · When we compile to javascript, all the types disappear. NestJS solves this problem by using decorators. So, let's try to fix this with ApiProperty and class validator decorators.
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.componentmodel.dataannotations.validator
Validator Class (System.ComponentModel.DataAnnotations) | Microsoft Learn
Defines a helper class that can be used to validate objects, properties, and methods when it is included in their associated ValidationAttribute attributes.
🌐
npm
npmjs.com › package › class-validator-extended
class-validator-extended - npm
July 5, 2025 - Additional validators for class-validator.. Latest version: 4.2.1, last published: a year ago. Start using class-validator-extended in your project by running `npm i class-validator-extended`. There are 2 other projects in the npm registry using class-validator-extended.
      » npm install class-validator-extended
    
Published   Jul 05, 2025
Version   4.2.1
🌐
GeeksforGeeks
geeksforgeeks.org › typescript › how-class-validator-works-in-typescript
How Class Validator works in TypeScript ? - GeeksforGeeks
August 5, 2025 - The class-validator is a TypeScript library that is used to validate the classes. It provides different decorators to validate different types of data in a class. It is mostly used with the NestJS and the TypeORM frameworks.
Find elsewhere
🌐
npmx
npmx.dev › package › class-validator
class-validator - npmx
Allows use of decorator and non-decorator based validation. Internally uses validator.js to perform validation. Class-validator works on both browser and node.js platforms.
🌐
npm
npmjs.com › package › class-validator-jsonschema
class-validator-jsonschema - npm
August 20, 2025 - The return value of this function is then not automatically merged into existing schema (i.e. the one derived from class-validator decorators). Instead you can handle merging yourself in whichever way is preferred, the idea being that removal of existing keywords and other more complex overwrite scenarios can be implemented here. class-validator supports validating nested objects via the @ValidateNested decorator.
      » npm install class-validator-jsonschema
    
Published   Aug 20, 2025
Version   5.1.0
🌐
OneUptime
oneuptime.com › home › blog › how to add validation with class-validator in nestjs
How to Add Validation with class-validator in NestJS
February 2, 2026 - In modern API development, validating user input is critical. class-validator brings decorator-based validation to TypeScript, and NestJS integrates it seamlessly through its ValidationPipe.
🌐
jsDocs.io
jsdocs.io › package › class-validator
class-validator@0.15.1 - jsDocs.io
February 26, 2026 - Decorator-based property validation for classes.
🌐
Pydantic
docs.pydantic.dev › latest › concepts › models
Models - Pydantic Validation
While the terms “parse” and “validation” were previously used interchangeably, moving forward, we aim to exclusively employ “validate”, with “parse” reserved specifically for discussions related to JSON parsing. ... Pydantic relies heavily on the existing Python typing constructs to define models. If you are not familiar with those, the following resources can be useful: ... from pydantic import BaseModel, ConfigDict class User(BaseModel): id: int name: str = 'Jane Doe' model_config = ConfigDict(str_max_length=10) # (1)
🌐
Stack Overflow
stackoverflow.com › questions › 76647125 › class-validator-validating-placeholder-properties
typescript - Class validator - validating placeholder properties - Stack Overflow
In the second snippet you could probably write your custom decorator, that would get all properties that value has, and trigger validation for them manually. I don't think there is a nice way to do it unless you provide how exactly you are going to use SimpleOperation, maybe the way to go here is to use it as a base class and subclass it adding exact fields or something like that
🌐
Quickbio
quickbio.co.uk › class-validator
The Complete Guide to Class Validator - QuickBio
December 4, 2025 - Instead of running validation logic directly inside your code when constraints are defined, it uses metadata storage to collect validation rules and apply them later when an object instance is validated. Here is a simplified flow of its internal process: Decorators are applied at class design time When you annotate class properties, class-validator stores constraint metadata into an internal registry.
🌐
Zod
zod.dev
Intro | Zod
Zod is a TypeScript-first validation library.
🌐
Pydantic
pydantic.dev › docs › validation › latest › concepts › validators
Validators | Pydantic Docs
Here is an example of a validator making changes to the validated value (no exception is raised). ... from typing import Annotated from pydantic import AfterValidator, BaseModel def double_number(value: int) -> int: return value * 2 class Model(BaseModel): number: Annotated[int, AfterValid...