Download the PHP package wandoubaba/think-validate without Composer
On this page you can find all versions of the php package wandoubaba/think-validate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wandoubaba/think-validate
More information about wandoubaba/think-validate
Files in wandoubaba/think-validate
Download wandoubaba/think-validate
More information about wandoubaba/think-validate
Files in wandoubaba/think-validate
Vendor wandoubaba
Package think-validate
Short Description fork from topthink/think-validate
License Apache-2.0
Package think-validate
Short Description fork from topthink/think-validate
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package think-validate
think-validate
基于PHP5.6+ 的Validate实现
来自topthink/think-validate的fork版本,针对8.0+环境做了一点点修复。
安装
composer require topthink/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
>=7.2.5
The package wandoubaba/think-validate contains the following files
Loading the files please wait ....