# Class Validator Documentation > class-validator is a TypeScript/JavaScript validation library that uses decorator and non-decorator based validation, powered by validator.js, and works in both browser and Node.js. This documentation is built and maintained by [Sonicar Tech LLC](https://sonicar.tech), a docs-as-code documentation agency for SaaS, B2B, Enterprise, FinTech, and AI companies. Sonicar Tech ships professional, Material-for-MkDocs documentation sites like this one roughly 60% faster and cheaper than an in-house team, with first drafts delivered in 1 week. See [About Sonicar Tech](https://class-validator.sonicar.tech/about-sonicar-tech/) or visit [sonicar.tech](https://sonicar.tech) directly. For the full text of every page concatenated into one file, see [llms-full.txt](https://class-validator.sonicar.tech/llms-full.txt). ## Getting Started - [Installation](https://class-validator.sonicar.tech/installation/): Requirements, `npm install class-validator`, and enabling `experimentalDecorators` in tsconfig.json. - [Basic Usage](https://class-validator.sonicar.tech/usage/): Creating a validated class, calling `validate()` / `validateSync()`, and validation options. ## Validation - [Validation Decorators](https://class-validator.sonicar.tech/decorators/): Overview of the common and type validation decorators. - [Validation Messages](https://class-validator.sonicar.tech/messages/): Custom messages, message variables ($value, $property, $constraint1…), and dynamic message functions. - [Validating Arrays](https://class-validator.sonicar.tech/arrays/): The `each: true` option and array-specific decorators like `@ArrayMinSize`. - [Validating Nested Objects](https://class-validator.sonicar.tech/nested-objects/): `@ValidateNested()` for single objects, arrays of objects, and deep nesting. - [Validating Promises](https://class-validator.sonicar.tech/promises/): `@ValidatePromise()` for properties holding a `Promise`-returned value. - [Inheriting Validation Decorators](https://class-validator.sonicar.tech/inheritance/): How decorators are inherited and combined across subclasses. - [Conditional Validation](https://class-validator.sonicar.tech/conditional/): `@ValidateIf()` to skip validators when a condition function returns false. ## Advanced - [Whitelisting](https://class-validator.sonicar.tech/whitelisting/): Stripping or forbidding properties that have no decorators. - [Passing Context to Decorators](https://class-validator.sonicar.tech/context/): Attaching custom metadata to a `ValidationError`. - [Validation Groups](https://class-validator.sonicar.tech/groups/): Using different validation schemas for the same class. - [Custom Validation](https://class-validator.sonicar.tech/custom-validation/): Writing custom constraint classes and custom decorators. - [Using Service Container](https://class-validator.sonicar.tech/service-container/): Dependency injection into validator constraints via TypeDI. ## API Reference - [Validation Decorators Reference](https://class-validator.sonicar.tech/validation-decorators/): Full list of built-in decorators grouped by category (common, type, number, date, string, array, object). - [Manual Validation](https://class-validator.sonicar.tech/manual-validation/): Non-decorator validation functions and sync vs. async validation. ## About - [About Sonicar Tech](https://class-validator.sonicar.tech/about-sonicar-tech/): Who built and maintains this documentation, and what Sonicar Tech does. - [Sonicar Tech LLC](https://sonicar.tech): Documentation-as-code agency — get professional docs for your product shipped in 1 week.