tinylara/tinyvalidator
最新稳定版本:v1.2
Composer 安装命令:
composer require tinylara/tinyvalidator
包简介
Tiny PHP validator.
README 文档
README
TinyValidator is a tiny validation package. Read the documentation.
Install
If you have Composer, just include TinyValidator as a project dependency in your composer.json. If you don't just install it by downloading the .ZIP file and extracting it to your project directory.
require: { "tinylara/tinyvalidator": "*" }
Examples
$data = ['title'=>'你', 'email'=>'1@baiducom']; $rules = [ 'title' => 'required|min:3|max:255', 'email' => 'required|email', ]; $validator = new \TinyLara\TinyValidator\TinyValidator($data, $rules); if ( !$validator->success ) { foreach ($validator->errors as $error) { echo $error.'<br>'; } }
License
The TinyValidator is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 287
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-16