https://github.com/inhere/php-validate
Lightweight and feature-rich PHP validation and filtering library. Support scene grouping, pre-filtering, array checking, custom validators, custom messages. 轻量且功能丰富的PHP验证、过滤库。支持场景分组,前置过滤,数组检查,自定义验证器,自定义消息。
https://github.com/inhere/php-validate
filter library php-validation tool validate validation validation-library
Last synced: 10 months ago
JSON representation
Lightweight and feature-rich PHP validation and filtering library. Support scene grouping, pre-filtering, array checking, custom validators, custom messages. 轻量且功能丰富的PHP验证、过滤库。支持场景分组,前置过滤,数组检查,自定义验证器,自定义消息。
- Host: GitHub
- URL: https://github.com/inhere/php-validate
- Owner: inhere
- License: mit
- Created: 2016-04-05T02:35:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-30T13:43:41.000Z (about 2 years ago)
- Last Synced: 2025-04-12T19:48:17.526Z (10 months ago)
- Topics: filter, library, php-validation, tool, validate, validation, validation-library
- Language: PHP
- Homepage: https://inhere.github.io/php-validate/
- Size: 619 KB
- Stars: 258
- Watchers: 12
- Forks: 33
- Open Issues: 15
-
Metadata Files:
- Readme: README.en.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Validate
[](LICENSE)
[](https://packagist.org/packages/inhere/php-validate)
[](https://packagist.org/packages/inhere/php-validate)
[](https://coveralls.io/github/inhere/php-validate?branch=master)
[](https://github.com/inhere/php-validate/actions)
[](README.md)
Lightweight and feature-rich PHP validation and filtering library.
- Simple and convenient, support to add custom validator
- Support pre-verification check, customize how to judge non-empty
- Support grouping rules by scene. Or partial verification
- Supports the use of filters to purify and filter values before verification [built-in filter](#built-in-filters)
- Support pre-processing and post-processing of verification [independent verification processing](#on-in-Validation)
- Support to customize the error message, field translation, message translation of each verification, and support the default value
- Supports basic array checking, checking of children (`'goods.apple'`) values of arrays, checking of children of wildcards (`'users.*.id' 'goods.*'`)
- Easy access to error information and secure data after verification (only data that has been checked regularly)
- More than 60 commonly used validators have been built-in [built-in validator](#built-in-validators)
- Rule setting reference `yii`, `laravel`, `Respect/Validation`
- Independent filter `Inhere\Validate\Filter\Filtration`, can be used for data filtering alone
## License
[MIT](LICENSE)