14 repositorios
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 es una biblioteca GraphQL con tipado fuerte para Python que permite el diseño de esquemas utilizando anotaciones de tipo y dataclasses de Python. Funciona como un servidor GraphQL asíncrono y motor de ejecución, proporcionando un puente para exponer esquemas a través de frameworks web compatibles con ASGI como FastAPI, Django, Flask y Litestar. El proyecto implementa GraphQL Federation, permitiendo la creación de esquemas y entidades distribuidas que se fusionan en un supergrafo unificado a través de múltiples servicios. También incluye un kit de herramientas dedicado para la especificación Relay, soportando la identificación global de objetos y la paginación basada en conexiones. El framework cubre un amplio conjunto de capacidades, incluyendo streaming de datos en tiempo real mediante WebSockets y Server-Sent Events, mapeo de modelos Pydantic y generación automática de código. Proporciona herramientas integradas para seguridad y observabilidad, como limitación de complejidad de consultas, control de acceso basado en roles y rastreo de métricas de ejecución. Los desarrolladores pueden realizar prototipos utilizando un servidor de desarrollo integrado con una interfaz de inspección de esquemas interactiva.
Enforces custom constraints during the query validation phase to ensure requests adhere to specific rules.
Connexion es un framework web de Python centrado en especificaciones diseñado para derivar el comportamiento del servidor y la lógica de validación directamente de un contrato de API predefinido. Permite el desarrollo de servicios web utilizando una especificación OpenAPI para manejar automáticamente el enrutamiento, la validación de solicitudes y la serialización de respuestas. El framework se distingue al actuar como un validador de solicitudes OpenAPI y servidor mock. Puede simular el comportamiento de la API sirviendo respuestas de ejemplo basadas en esquemas de especificación, permitiendo el desarrollo frontend y la creación de prototipos antes de que se complete una implementación backend. Además, aloja una interfaz de documentación de API interactiva, proporcionando una consola para que los usuarios visualicen y prueben endpoints. El proyecto cubre una amplia gama de capacidades, incluyendo registro automático de rutas, inyección de parámetros y aplicación de seguridad basada en definiciones de contrato. También proporciona herramientas para la validación de esquemas tanto de solicitudes como de respuestas, así como la capacidad de mapear excepciones de la aplicación a respuestas de error estandarizadas legibles por máquina.
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 es un framework de validación de Java diseñado para aplicar la integridad de los datos a través de restricciones declarativas y comprobaciones automatizadas en la capa de servicio. Proporciona un entorno estructurado para definir la lógica de validación que se integra con la especificación JSR 303, permitiendo a los desarrolladores mantener una calidad de datos consistente en jerarquías de objetos complejas y límites de aplicación. El framework se distingue por una interfaz fluida que permite la orquestación de cadenas de validación, permitiendo secuencias de reglas legibles y mantenibles. Admite un control de ejecución avanzado, incluida la capacidad de cambiar entre estrategias de fallo rápido y tolerancia a fallos, y utiliza la interceptación basada en proxy para verificar automáticamente los argumentos de los métodos dentro de contenedores gestionados. Más allá de la integración de restricciones estándar, la librería facilita una integridad de datos profunda a través del recorrido recursivo de grafos de objetos y la validación en cascada. Se adapta a los requisitos comerciales dinámicos al admitir lógica condicional, grupos de validación para la resolución de reglas consciente del contexto y la inyección de propiedades externas en el alcance de la validación. Los desarrolladores también pueden implementar clases de validación personalizadas para manejar requisitos de datos únicos junto con anotaciones estándar.
Automates object graph validation and service argument checks using declarative annotations and method interception.