30 open-source projects similar to symfony/validator, ranked by how many features they have in common. Compare stars, activity and what each one does to find the best Validator alternative.
async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex object structures and nested arrays by applying recursive rules and non-blocking, promise-based execution to ensure data integrity. The library functions as both an object constraint validator and a data transformation pipeline. It allows for the sanitization, coercion, and formatting of input values through a sequence of functions that run before and after the primary validation process. The engine covers a range of capabilities including recursive nested validation, the en
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
Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects remain consistent. It functions as a schema-based validator and object schema definition tool, preventing invalid information from entering an application by checking data against predefined constraints and rules. The library employs a chainable fluent interface and a constraint-based validation engine to build complex validation pipelines. It utilizes recursive tree traversal to validate nested data structures and a type-coercion pipeline to transform input values into the t
Ajv is a high-performance data validation framework that compiles JSON schemas into optimized, standalone JavaScript functions. By transforming declarative schema definitions into executable code, it eliminates runtime interpretation overhead and provides a secure, efficient way to enforce data integrity across both browser and server environments. The library distinguishes itself through its focus on performance and type safety. It employs advanced compilation techniques, including abstract syntax tree optimization and function caching, to ensure rapid validation. Beyond standard checks, it
This library is a PHP framework designed for validating and sanitizing incoming data. It provides a structured approach to ensuring that information conforms to expected formats and integrity requirements before it is processed or stored by an application. The project utilizes a fluent interface to construct validation logic, allowing for the definition of complex rules through chainable methods. It employs a strategy-based execution model where individual validation components are encapsulated and can be dynamically assigned to data fields. When validation fails, the system uses an exception
Hibernate Validator is a reference implementation of the Jakarta Validation specification, serving as a framework for enforcing data integrity across Java applications. It functions as a declarative validation engine that processes object constraints to ensure that application state remains consistent. By utilizing metadata-driven rules, the library validates object properties, method parameters, and nested collections to maintain data standards throughout an application's layers. The library distinguishes itself through its ability to perform static analysis on validation configurations, ide
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
This library is a data assertion tool and equality logic framework for PHP. It provides utilities to verify that two values, nested objects, or complex data types match based on their internal contents. The project distinguishes itself through the use of custom matching rules and configurable precision. It allows for the comparison of floating point numbers and dates using a defined margin of error to account for numeric precision loss. The framework covers deep value equality verification across scalars, arrays, and nested objects. It implements strict type enforcement to prevent implicit c
Vee-validate is a form validation library and state management tool for Vue applications. It enables the validation of user inputs through declarative rules and tracks form metadata, including submission status and dirty states. The library functions as a wrapper for integrating external schema validation libraries to enforce consistent data shapes. It also serves as an internationalized framework for displaying translated error messages and localized feedback. The project covers broad capability areas including form state management, the handling of complex nested data structures, and the s
Validator.js is a library of pure, stateless functions designed for the validation and sanitization of string data within any JavaScript environment. It provides a modular suite of tools to verify that user-provided information conforms to specific formats, such as emails, URLs, and dates, while simultaneously cleaning untrusted input to mitigate security risks. The library distinguishes itself through a design that avoids platform-specific APIs, ensuring consistent execution across browsers, servers, and edge runtimes. By utilizing a pre-compiled regular expression engine and a pure data tra
This project provides the JSON Schema Specification, a standard for annotating and validating JSON documents to ensure consistent data structures across different systems. It serves as a data validation standard and an interoperability standard, establishing a common language for exchanging data definitions between different programming languages and platforms. The specification includes a machine-readable framework for defining JSON vocabularies, which describes the expected types, formats, and structures of data objects. It enables the creation of standardized, machine-readable documentatio
v8n is a JavaScript data validation library used to verify that values, objects, and arrays meet specific criteria. It functions as a schema-based validator and an asynchronous validation engine, utilizing a fluent API to construct sequences of chainable rules and constraints. The framework is distinguished by its ability to execute promises and network requests during the validation process to determine if a value is valid. It allows for the creation of reusable validation schemas and provides a customizable rule framework where users can define their own logic and configure how error result
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
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
Instructor is a framework designed for structured data extraction, validation, and language model integration. It functions as a library that transforms unstructured text into validated, type-safe objects by leveraging schema definitions and model-specific tool-calling capabilities. By acting as a validation middleware, the project ensures that language model outputs strictly conform to defined data structures. The library distinguishes itself through a robust validation-based retry loop that automatically re-submits failed responses with error feedback to iteratively correct schema complianc
Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It functions as a runtime type guard, allowing developers to define complex data structures through a declarative, chainable syntax. By using these schema definitions, the library automatically derives static TypeScript types, eliminating the need for manual type duplication and ensuring that runtime data matches expected application contracts. The library distinguishes itself through functional schema composition, which enables the creation of hierarchical structures by nesting a
Dry-validation is a Ruby library designed for defining type-safe schemas and complex validation rules to verify and sanitize input data structures. It provides a formal framework for constructing modular validation logic, ensuring that incoming information meets specific business requirements and data formats before it is processed by an application. The library utilizes a domain-specific language to declare validation rules, which are then parsed into executable objects. It distinguishes itself through a macro-driven system that bundles common validation logic into reusable shortcuts, alongs
Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.
This library is a declarative validation framework for Rust that enforces data integrity and business rules on structured data models. It utilizes procedural macros to transform attribute-based annotations into executable validation logic, ensuring that data structures adhere to defined constraints before processing. The framework distinguishes itself by performing validation at compile time, which eliminates runtime overhead and provides strict type checking for all rules. It supports recursive traversal of nested data structures and collections, ensuring that every level of a hierarchy is v
This project is a Java library designed to validate JSON documents against defined schema specifications. It functions as a standards-compliant engine that ensures data integrity by checking structural compliance and enforcing business rules within Java applications. The library distinguishes itself through its flexible validation strategies, allowing developers to inject custom logic and pattern-matching engines to handle specialized data formats. It supports configurable execution modes, enabling users to either halt validation immediately upon the first error or collect all violations for
This library is a Ruby-based validation engine designed to verify JSON data structures against official schema specifications. It ensures data integrity by confirming that objects, strings, and files conform to defined structural constraints, while also validating the integrity of the schema definitions themselves against official metaschema standards. The project distinguishes itself through a highly modular architecture that allows for deep customization. Users can register custom validation rules and format handlers to enforce project-specific business logic that extends beyond standard sp
Fluent-validator is a Java validation framework designed to enforce data integrity through declarative constraints and automated service-layer checks. It provides a structured environment for defining validation logic that integrates with the JSR 303 specification, allowing developers to maintain consistent data quality across complex object hierarchies and application boundaries. The framework distinguishes itself through a fluent interface that enables the orchestration of validation chains, allowing for readable and maintainable rule sequences. It supports advanced execution control, inclu
This library provides a declarative approach to conditional logic in TypeScript, replacing imperative branching with structural pattern matching. It functions as a tool for decomposing complex data structures and mapping them to specific execution branches, ensuring that all possible states are accounted for during development. The library distinguishes itself by enforcing exhaustive logic, which requires developers to address every possible branch of a data structure to prevent runtime errors. By leveraging compile-time type narrowing and recursive evaluation, it allows for the validation an
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
Ajv is a JSON Schema validator and schema compilation engine used to verify that JavaScript objects conform to specific JSON Schema definitions. It functions as a data coercer and localization tool, allowing for the application of default values and the translation of validation error messages into different languages. The project converts declarative JSON Schema definitions into optimized JavaScript functions to increase validation speed. It supports the extension of validation logic through custom keywords and the generation of standalone validation code that executes without external depen
Respect/Validation is a PHP validation library that operates on single input values through a fluent, chainable rule system. Each validator instance builds a linear constraint pipeline by appending rules to an internal stack, executing them sequentially and short-circuiting on the first failure. The library captures validation failures as structured exceptions, enabling callers to inspect detailed error metadata programmatically and respond with meaningful messages. The library distinguishes itself through its exception-based error handling model, which provides programmatic access to validat
EmailValidator is a PHP library for verifying email address syntax, format, and DNS records against technical specifications. It functions as a logic-based checker to ensure email addresses follow standard global formatting and communication rules. The library includes security utilities to identify deceptive characters and spoofing attempts in email addresses. These anti-spoofing tools analyze email strings for Unicode characters that mimic standard Latin letters to prevent fraudulent impersonation. The project covers domain verification through DNS record checks to confirm a destination se
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
Marshmallow is a Python data serialization library and validation framework. It functions as a bridge that transforms complex application objects into primitive data types for storage or network transmission and vice versa. The library utilizes a schema-based approach to validate that incoming data conforms to specific types and constraints. It employs a two-way transformation pipeline consisting of separate load and dump phases to handle deserialization and serialization. The framework supports class-based schema definitions with declarative field validation and recursive schema nesting for
This is a Go struct validation library used to maintain data integrity by enforcing constraints on fields, slices, and maps. It functions as a schema validation tool and data integrity validator, ensuring that complex nested structures adhere to predefined rules. The library utilizes struct tags to configure validation logic at runtime and supports a custom function registry for extending validation rules. It is distinguished by its ability to perform cross-field dependency evaluation, allowing the comparison of values between different fields within the same data structure to ensure logical