Download the PHP package songyue/think-validate without Composer
On this page you can find all versions of the php package songyue/think-validate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package think-validate
think-validate
基于PHP5.6+ 的Validate实现
安装
composer require songyue/think-validate
用法
use think\Validate;
$validate = Validate::make([
'name' => 'require|max:25',
'email' => 'email'
]);
$data = [
'name' => 'thinkphp',
'email' => '[email protected]'
];
if (!$validate->check($data)) {
var_dump($validate->getError());
}
支持创建验证器进行数据验证
验证器调用代码如下:
$data = [
'name' => 'thinkphp',
'email' => '[email protected]',
];
$validate = new \app\index\validate\User;
if (!$validate->check($data)) {
var_dump($validate->getError());
}
更多用法可以参考5.1完全开发手册的验证章节
All versions of think-validate with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.0
The package songyue/think-validate contains the following files
Loading the files please wait ....