14 Repos
Runtime validation of class properties using decorators to ensure data integrity.
Distinct from Request Validation Classes: None of the candidates describe the general pattern of validating class properties via decorators.
Explore 14 awesome GitHub repositories matching software engineering & architecture · Class Property Validation. Refine with filters or upvote what's useful.
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 field
Checks that class properties meet specific criteria using decorators to ensure data integrity before processing.
go-swagger is a toolkit for working with Swagger/OpenAPI 2.0 specifications in Go. It generates server, client, and CLI code from a specification document, and can also produce a specification by scanning annotated Go source code. The project includes a static validation engine that checks documents against the schema and project-specific rules, and a specification transformation pipeline that resolves, flattens, and merges documents. The toolkit generates both client and server code from the same specification, ensuring consistency in request and response handling. It also produces a command
Allows injection of custom validation logic into generated Go struct models.
FluentValidation is a .NET validation library used to define strongly-typed validation rules for objects. It utilizes a fluent interface API and lambda expressions to ensure data integrity for classes and properties within the .NET type system. The library separates validation logic from business entities to keep domain models focused on core functionality. This approach enables the enforcement of business logic and the sanitization of input data or API payloads through a sequence of logic checks. The system supports complex validation surface areas, including the ability to nest validators
Allows the integration of custom validator classes and functions to implement domain-specific validation logic.
Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida
Constrains types to specific classes using instance checks during runtime validation.
This PHP assertion library is a runtime data validator used to verify method inputs and outputs. It provides a toolkit for validating data types, numeric ranges, and string patterns during program execution to prevent invalid states. The project serves as a static analysis helper by providing type hints and annotations that improve the accuracy of formal verification tools. It includes a collection validation utility for applying rules across arrays or iterable collections, and a filesystem validation tool to verify path existence and read or write permissions. The library covers a broad ran
Verifies the existence of specific methods or properties and checks if class properties have been initialized.
Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions. The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures. Its capabilities cover the validatio
Provides the mechanism for creating specialized validation rules for types not covered by standard primitives.
Symfony Translation is a PHP library and framework component for internationalizing applications. It provides a complete system for managing message catalogs, handling locale-aware string translation, and formatting messages using ICU MessageFormat syntax to support pluralization, gender, and conditional selection. The component organizes translatable strings into named domains, supports key-based lookup that decouples source text from localized versions, and offers deferred rendering through translatable objects that store parameters and render only when output is needed. The library disting
Enables adding validation constraints to third-party classes without modifying their source code.
Moleculer is a Node.js microservices framework designed for building distributed systems. It functions as a distributed service broker, task orchestrator, and service mesh framework, enabling a decentralized architecture with built-in service discovery and load balancing. The project differentiates itself through a pluggable transport layer supporting protocols such as NATS, Redis, TCP, and Kafka, as well as a dedicated microservices API gateway that maps external HTTP and WebSocket requests to internal service actions. It includes built-in fault tolerance mechanisms, including circuit breake
Allows replacing the default validation engine with a custom class or external library for specialized constraints.
Sequel is a relational database toolkit for Ruby that provides object-relational mapping, a fluent SQL query builder, and schema migration capabilities. It maps database tables to Ruby classes with support for associations, validations, lifecycle hooks, and eager loading, offering a comprehensive ORM layer for building data-centric applications. Sequel distinguishes itself through a plugin-based extension architecture that allows composable customization of models, databases, and datasets without relying on deep inheritance hierarchies. It includes a thread-safe connection pool with support f
Defines validations using class-level declarations instead of instance methods for legacy compatibility.
Strawberry is a type-safe GraphQL library for Python that enables the design of schemas using Python type annotations and dataclasses. It functions as an asynchronous GraphQL server and execution engine, providing a bridge to expose schemas across ASGI-compliant web frameworks such as FastAPI, Django, Flask, and Litestar. The project implements GraphQL Federation, allowing for the creation of distributed schemas and entities that merge into a unified supergraph across multiple services. It also includes a dedicated toolkit for the Relay specification, supporting global object identification a
Enforces custom constraints during the query validation phase to ensure requests adhere to specific rules.
Connexion ist ein Spec-First-Python-Webframework, das darauf ausgelegt ist, Serververhalten und Validierungslogik direkt aus einem vordefinierten API-Vertrag abzuleiten. Es ermöglicht die Entwicklung von Webdiensten durch die Verwendung einer OpenAPI-Spezifikation, um Routing, Request-Validierung und Response-Serialisierung automatisch zu handhaben. Das Framework zeichnet sich dadurch aus, dass es als OpenAPI-Request-Validator und Mock-Server fungiert. Es kann API-Verhalten simulieren, indem es Beispielantworten basierend auf Spezifikationsschemata bereitstellt, was Frontend-Entwicklung und Prototyping vor Abschluss der Backend-Implementierung ermöglicht. Zudem hostet es eine interaktive API-Dokumentationsschnittstelle, die Benutzern eine Konsole zur Visualisierung und zum Testen von Endpunkten bietet. Das Projekt deckt ein breites Spektrum an Funktionen ab, einschließlich automatisierter Routenregistrierung, Parameter-Injektion und Sicherheitsdurchsetzung basierend auf Vertragsdefinitionen. Es bietet zudem Tools zur Schema-Validierung von Requests und Responses sowie die Möglichkeit, Anwendungs-Exceptions auf standardisierte maschinenlesbare Fehlerantworten abzubilden.
Defines pluggable validation logic for request bodies and responses based on specific content types.
This library is a PHP-based serialization framework designed to convert complex object graphs into structured formats such as JSON, XML, YAML, and CSV, and to reconstruct those objects from serialized data. It functions as a data transformation tool that maps object properties to array structures, facilitating both application state persistence and the exchange of data between systems. The framework distinguishes itself through a two-stage pipeline that normalizes objects into intermediate structures before encoding them into specific formats. It supports advanced mapping requirements, includ
Enables applying serialization attributes to third-party classes without modifying source code by mapping metadata to target classes.
This platform is a social network application designed for managing community book exchanges and personal digital libraries. It provides a structured environment for users to organize book collections, coordinate the borrowing and returning of items, and manage approval workflows for shared resources. The system is built as a RESTful backend that integrates user account management with secure, token-based authentication. It utilizes email-driven identity verification to secure access and maintains persistent state through a relational database, ensuring that user profiles and library assets r
Uses declarative class and field annotations to trigger automated integrity checks during runtime.
Fluent-validator ist ein Java-Validierungs-Framework zur Durchsetzung von Datenintegrität durch deklarative Constraints und automatisierte Service-Layer-Prüfungen. Es bietet eine strukturierte Umgebung zur Definition von Validierungslogik, die sich in die JSR 303-Spezifikation integriert, was es Entwicklern ermöglicht, eine konsistente Datenqualität über komplexe Objekt-Hierarchien und Anwendungsgrenzen hinweg zu wahren. Das Framework zeichnet sich durch ein flüssiges Interface aus, das die Orchestrierung von Validierungsketten ermöglicht, was zu lesbaren und wartbaren Regelsequenzen führt. Es unterstützt fortgeschrittene Ausführungskontrolle, einschließlich der Fähigkeit, zwischen Fail-Fast- und Fail-Over-Strategien zu wechseln, und nutzt Proxy-basierte Interception, um Methodenargumente innerhalb verwalteter Container automatisch zu verifizieren. Über die Standard-Constraint-Integration hinaus erleichtert die Bibliothek tiefe Datenintegrität durch rekursive Objektgraph-Traversierung und kaskadierte Validierung. Sie kommt dynamischen Geschäftsanforderungen entgegen, indem sie bedingte Logik, Validierungsgruppen für kontextbewusste Regelauflösung und die Injektion externer Eigenschaften in den Validierungsumfang unterstützt. Entwickler können zudem benutzerdefinierte Validierungsklassen implementieren, um einzigartige Datenanforderungen neben Standard-Annotationen zu handhaben.
Automates object graph validation and service argument checks using declarative annotations and method interception.