awesome-repositories.com
ब्लॉग
awesome-repositories.com

AI-संचालित खोज के साथ बेहतरीन ओपन-सोर्स रिपॉजिटरी खोजें।

एक्सप्लोर करेंक्यूरेटेड खोजेंओपन-सोर्स विकल्पसेल्फ-होस्टेड सॉफ्टवेयरब्लॉगसाइटमैप
प्रोजेक्टहमारे बारे मेंहम रैंकिंग कैसे करते हैंप्रेसMCP सर्वर
कानूनीगोपनीयताशर्तें
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
typestack avatar

typestack/class-validator

0
View on GitHub↗
11,796 स्टार्स·845 फोर्क्स·TypeScript·MIT·9 व्यूज़

Class Validator

class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules.

The library provides a recursive validation system for checking complex data hierarchies, including nested classes and individual elements within collections. It includes an object property whitelist utility capable of stripping undocumented properties or blocking unknown fields from entering a validated class instance.

The framework covers a broad range of capabilities, including custom validation rule definition, conditional execution, and validation grouping for context-specific schemas. It also supports dynamic error message interpolation and the integration of external services via dependency injection for custom constraints.

Features

  • Data Validation - Ensures TypeScript class properties meet specific criteria using decorators to maintain data integrity and type safety.
  • Class Property Validation - Checks that class properties meet specific criteria using decorators to ensure data integrity before processing.
  • Property Whitelisting - Compares object keys against decorated class properties to strip or block non-whitelisted data.
  • Asynchronous Validators - Supports promise-based asynchronous rules for verifying data against external sources or databases.
  • Contextual Validation Groups - Assigns decorators to specific groups to apply different validation schemas to the same object in different contexts.
  • Recursive Hierarchy Validation - Provides a recursive validation system for checking complex data hierarchies and individual elements within collections.
  • Strict Schema Enforcers - Blocks objects containing properties not defined in the class to ensure strict adherence to the data schema.
  • Asynchronous Validation - Wraps validation checks in promises to allow for network requests or database lookups before returning results.
  • Schema Tree Traversers - Recursively walks through nested objects and collections to apply validation rules across deep data hierarchies.
  • Custom Validation Rules - Allows defining reusable validation logic by implementing constraint interfaces and registering them globally.
  • Nested Object Validation - Recursively checks properties that are instances of other decorated classes or multi-dimensional arrays.
  • Recursive Object Validation - Implements a recursive validation system for verifying complex data hierarchies, including nested classes and collections.
  • Decorator-Based Validation - Uses TypeScript decorators to define constraints and rules for object properties as metadata.
  • Validation Grouping - Filters which validation constraints to run by matching active group names against metadata tags.
  • Validation Libraries - Offers a comprehensive library of decorator-driven rules for verifying data integrity and structural correctness in TypeScript classes.
  • Additional Property Filtering - Removes properties without decorators from an object or triggers errors when non-whitelisted properties are found.
  • Metadata Collection - Uses TypeScript decorators to store validation constraints as metadata for runtime retrieval.
  • Conditional Validation Rules - Allows skipping specific property checks based on boolean condition functions or property-level triggers.
  • Conditional Enforcement - Supports applying specific sets of validation constraints based on active group tags for context-dependent schemas.
  • Dependency-Injected Constraints - Enables providing external tools and data to custom validation constraint classes via a service container.
  • Input Sanitization - Includes an object property whitelist utility to strip undocumented properties and prevent unknown fields from entering the system.
  • Property Strictness - Provides a whitelist utility that ensures objects contain only specified keys by stripping or prohibiting extra properties.
  • Array Schema Validation - Applies validation rules to every individual element within arrays, sets, or maps.
  • Dependency Injection Containers - Integrates a service container to resolve custom validation logic and provide external dependencies to validators.
  • Request Validation - Provides utilities to validate incoming request data against class-based schemas to ensure security and correctness.
  • External Data Validation - Processes properties that return promises to allow for validation requiring external data or API calls.
  • Data Validation - Decorator-based class property validation.

स्टार हिस्ट्री

typestack/class-validator के लिए स्टार हिस्ट्री चार्टtypestack/class-validator के लिए स्टार हिस्ट्री चार्ट

AI सर्च

और अधिक बेहतरीन रिपॉजिटरी खोजें

अपनी ज़रूरत को सरल भाषा में बताएं — AI हजारों क्यूरेटेड ओपन-सोर्स प्रोजेक्ट्स को प्रासंगिकता के आधार पर रैंक करता है।

Start searching with AI

Class Validator के ओपन-सोर्स विकल्प

समान ओपन-सोर्स प्रोजेक्ट्स, जो Class Validator के साथ साझा की गई सुविधाओं के आधार पर रैंक किए गए हैं।
  • hapijs/joihapijs का अवतार

    hapijs/joi

    21,192GitHub पर देखें↗

    Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application. The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the

    JavaScripthapijavascriptschema
    GitHub पर देखें↗21,192
  • open-circle/valibotopen-circle का अवतार

    open-circle/valibot

    8,769GitHub पर देखें↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    TypeScriptbundle-sizemodularparsing
    GitHub पर देखें↗8,769
  • jquense/yupjquense का अवतार

    jquense/yup

    23,673GitHub पर देखें↗

    Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def

    TypeScript
    GitHub पर देखें↗23,673
  • go-ozzo/ozzo-validationgo-ozzo का अवतार

    go-ozzo/ozzo-validation

    4,072GitHub पर देखें↗

    ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types using a declarative, rule-based approach. It functions as an interface-based validator, allowing for the recursive checking of nested data structures and custom types without the use of struct tags. The framework distinguishes itself as a context-aware validation engine, supporting the propagation of request-scoped data to rules that depend on external state. It provides extensive extensibility through custom rule definitions and the ability to override default failure text with l

    Gogogolangozzo
    GitHub पर देखें↗4,072
Class Validator के सभी 30 विकल्प देखें→

अक्सर पूछे जाने वाले प्रश्न

typestack/class-validator क्या करता है?

class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules.

typestack/class-validator की मुख्य विशेषताएं क्या हैं?

typestack/class-validator की मुख्य विशेषताएं हैं: Data Validation, Class Property Validation, Property Whitelisting, Asynchronous Validators, Contextual Validation Groups, Recursive Hierarchy Validation, Strict Schema Enforcers, Asynchronous Validation।

typestack/class-validator के कुछ ओपन-सोर्स विकल्प क्या हैं?

typestack/class-validator के ओपन-सोर्स विकल्पों में शामिल हैं: hapijs/joi — Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It… open-circle/valibot — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments. jquense/yup — Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as… go-ozzo/ozzo-validation — ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types… yiminghe/async-validator — async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex… neoremind/fluent-validator — Fluent-validator is a Java validation framework designed to enforce data integrity through declarative constraints and…