awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
symfony avatar

symfony/validator

0
View on GitHub↗
2,689 星标·106 分支·PHP·MIT·9 次浏览symfony.com/validator↗

Validator

该库是一个 PHP 框架,用于通过根据预定义约束验证标量值和复杂对象结构来强制执行数据完整性和业务规则。它提供了一种检查对象图和属性元数据的结构化方法,确保数据在被应用处理之前符合预期要求。

该框架的特色在于元数据驱动的映射系统,它使用反射或配置文件将规则直接应用于对象属性。它支持上下文规则编排,允许开发者将约束组织成逻辑组,根据应用状态或数据生命周期有选择地触发。该系统还采用基于访问者的遍历模式来检查复杂对象结构,并使用惰性加载仅在需要时实例化验证规则。

除了核心验证外,该库还包括用于数据格式化、时间比较和输入清理的实用程序。它具有解耦的架构,将约束定义与执行逻辑分离开来,从而能够创建可重用的、特定于领域的规则。错误处理通过翻译抽象层进行管理,该层将违规结果映射为本地化消息,以实现国际化的报告。

Features

  • Data Validation - Validates values and object properties against predefined rule sets to ensure compliance with business logic.
  • PHP Validation Libraries - Provides a comprehensive framework for enforcing data integrity and business rules through constraint-based validation in PHP applications.
  • Data Validation - Ensures incoming data and complex objects conform to business rules and structural requirements before processing.
  • Object Constraint Validation Engines - Implements a structured engine for validating complex object graphs and property metadata against predefined business rules.
  • Constraint Mappings - Uses reflection and configuration to map validation rules directly onto object properties for automated integrity checks.
  • Custom Logic Validation - Enables the creation of reusable, domain-specific validation logic that can be applied to any data structure.
  • Data Validation Libraries - Checks individual scalar values against defined constraints to ensure they meet specific format or value requirements.
  • Format Validation Rules - Validates input data against specific patterns like cron expressions or structured markup to ensure format compliance.
  • Structural Data Validators - Inspects properties and states of complex objects to ensure data integrity and consistency within the application model.
  • Domain-Specific Validation Rules - Orchestrates validation logic into groups that trigger selectively based on the data lifecycle or application state.
  • Validation Message Localization - Routes validation failure messages through a localization layer to provide multi-language support for error reporting.
  • Data Structure Traversers - Implements visitor-based traversal to inspect complex object graphs and delegate validation logic to specific handlers.
  • Validation Grouping - Organizes validation rules into logical sets that trigger selectively based on the application state.
  • Validation Logic Decoupling - Separates validation rules from domain entities to maintain clean, testable, and reusable validation logic.
  • Input Sanitizers - Provides robust input sanitization utilities to ensure user-provided data conforms to security and format constraints.

Star 历史

symfony/validator 的 Star 历史图表symfony/validator 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

包含 Validator 的精选搜索

收录 Validator 的精选合集。
  • 模型属性验证库

Validator 的开源替代方案

相似的开源项目,按与 Validator 的功能重合度排序。
  • yiminghe/async-validatoryiminghe 的头像

    yiminghe/async-validator

    9,099在 GitHub 上查看↗

    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

    TypeScript
    在 GitHub 上查看↗9,099
  • jquense/yupjquense 的头像

    jquense/yup

    23,673在 GitHub 上查看↗

    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
  • sideway/joisideway 的头像

    sideway/joi

    21,192在 GitHub 上查看↗

    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

    JavaScript
    在 GitHub 上查看↗21,192
  • meteor-community-packages/meteor-simple-schemaMeteor-Community-Packages 的头像

    Meteor-Community-Packages/meteor-simple-schema

    915在 GitHub 上查看↗

    This library provides a comprehensive system for defining data schemas and enforcing structural integrity within JavaScript applications. It enables developers to construct declarative rules for complex, nested objects, ensuring that data conforms to expected types and constraints before it is processed or stored. By integrating directly with the Meteor framework, it serves as a central tool for maintaining consistent data structures across collections and remote procedure calls. The project distinguishes itself through its deep integration with reactive data systems, allowing validation stat

    JavaScriptcleaning-dataform-generationform-validation
    在 GitHub 上查看↗915
查看 Validator 的所有 30 个替代方案→

常见问题解答

symfony/validator 是做什么的?

该库是一个 PHP 框架,用于通过根据预定义约束验证标量值和复杂对象结构来强制执行数据完整性和业务规则。它提供了一种检查对象图和属性元数据的结构化方法,确保数据在被应用处理之前符合预期要求。

symfony/validator 的主要功能有哪些?

symfony/validator 的主要功能包括:Data Validation, PHP Validation Libraries, Object Constraint Validation Engines, Constraint Mappings, Custom Logic Validation, Data Validation Libraries, Format Validation Rules, Structural Data Validators。

symfony/validator 有哪些开源替代品?

symfony/validator 的开源替代品包括: yiminghe/async-validator — async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex… jquense/yup — Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as… sideway/joi — Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects… meteor-community-packages/meteor-simple-schema — This library provides a comprehensive system for defining data schemas and enforcing structural integrity within… ajv-validator/ajv — Ajv is a high-performance data validation framework that compiles JSON schemas into optimized, standalone JavaScript… aplus-framework/validation — This library is a PHP framework designed for validating and sanitizing incoming data. It provides a structured…