phossa2/validate
Composer 安装命令:
composer require phossa2/validate
包简介
A PHP validation proxy to various validate libraries.
关键字:
README 文档
README
phossa2/validate is a PHP validation proxy to various validate libraries.
It requires PHP 5.4, supports PHP 7.0+ and HHVM. It is compliant with PSR-1, PSR-2, PSR-3, PSR-4, and the proposed PSR-5.
Installation
Install via the composer utility.
composer require "phossa2/validate"
or add the following lines to your composer.json
{
"require": {
"phossa2/validate": "^2.0.0"
}
}
Usage
Create the validate instance,
use Phossa2\Validate\Validate; $v = new Validate(); if (true === $v->validate($_POST, [ 'username' => 'required|alpha_numeric', 'password' => 'required|max_len,100|min_len,6' ])) { // continue } else { $err = $v->getError(); }
Change log
Please see CHANGELOG from more information.
Testing
$ composer test
Contributing
Please see CONTRIBUTE for more information.
Dependencies
-
PHP >= 5.4.0
-
phossa2/shared >= 2.0.21
-
wixel/gump >= 1.4
License
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-26