14 dépôts
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 est une bibliothèque GraphQL typée pour Python qui permet la conception de schémas en utilisant des annotations de type Python et des dataclasses. Elle fonctionne comme un serveur GraphQL asynchrone et un moteur d'exécution, fournissant un pont pour exposer des schémas à travers des frameworks web compatibles ASGI tels que FastAPI, Django, Flask et Litestar. Le projet implémente la fédération GraphQL, permettant la création de schémas distribués et d'entités qui fusionnent en un supergraphe unifié à travers plusieurs services. Il inclut également une boîte à outils dédiée pour la spécification Relay, prenant en charge l'identification globale d'objets et la pagination basée sur les connexions. Le framework couvre un large ensemble de capacités, incluant le streaming de données en temps réel via WebSockets et Server-Sent Events, le mapping de modèles Pydantic et la génération automatique de code. Il fournit des outils intégrés pour la sécurité et l'observabilité, tels que la limitation de complexité des requêtes, le contrôle d'accès basé sur les rôles et le traçage des métriques d'exécution. Les développeurs peuvent prototyper en utilisant un serveur de développement intégré avec une interface d'inspection de schéma interactive.
Enforces custom constraints during the query validation phase to ensure requests adhere to specific rules.
Connexion is a spec-first Python web framework designed to derive server behavior and validation logic directly from a predefined API contract. It enables the development of web services by using an OpenAPI specification to automatically handle routing, request validation, and response serialization. The framework distinguishes itself by acting as an OpenAPI request validator and mock server. It can simulate API behavior by serving example responses based on specification schemas, allowing for frontend development and prototyping before a backend implementation is completed. Additionally, it
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 est un framework de validation Java conçu pour appliquer l'intégrité des données via des contraintes déclaratives et des vérifications automatisées au niveau de la couche de service. Il fournit un environnement structuré pour définir une logique de validation qui s'intègre avec la spécification JSR 303, permettant aux développeurs de maintenir une qualité de données cohérente à travers des hiérarchies d'objets complexes et des limites d'application. Le framework se distingue par une interface fluide qui permet l'orchestration de chaînes de validation, permettant des séquences de règles lisibles et maintenables. Il prend en charge un contrôle d'exécution avancé, y compris la capacité de basculer entre des stratégies d'échec rapide et de basculement, et utilise une interception basée sur proxy pour vérifier automatiquement les arguments de méthode au sein des conteneurs gérés. Au-delà de l'intégration de contraintes standards, la bibliothèque facilite une intégrité profonde des données via le parcours récursif de graphes d'objets et la validation en cascade. Elle s'adapte aux exigences commerciales dynamiques en prenant en charge la logique conditionnelle, les groupes de validation pour la résolution de règles sensible au contexte et l'injection de propriétés externes dans la portée de validation. Les développeurs peuvent également implémenter des classes de validation personnalisées pour gérer des exigences de données uniques aux côtés des annotations standards.
Automates object graph validation and service argument checks using declarative annotations and method interception.