Download the PHP package shayvmo/think-validate without Composer
On this page you can find all versions of the php package shayvmo/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
基于PHP8.0+ 的Validate实现。
原仓库: https://github.com/top-think/think-validate
安装
composer require shayvmo/think-validate
用法
use shayvmo\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());
}
更多用法可以参考ThinkPHP手册
All versions of think-validate with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
ext-fileinfo Version *
ext-fileinfo Version *
The package shayvmo/think-validate contains the following files
Loading the files please wait ....