sylae/validator
Composer 安装命令:
composer require sylae/validator
包简介
PHP Validator for stuff.
关键字:
README 文档
README
This is a PHP validator for stuff.
Usage
Include composer's autoloader and initialize an instance.
<?php // include autoloader //This one will not fail $nofail = CharlotteDunois\Validation\Validator::make( array( 'username' => 'CharlotteDunois', 'email' => 'noreply@github.com' ), array( 'username' => 'string|required|min:5|max:75', 'email' => 'email' ) ); var_dump($nofail->passes()); //This one will fail due to invalid email $fail = CharlotteDunois\Validation\Validator::make( array( 'username' => 'CharlotteDuois', 'email' => 'noreply@githubcom' ), array( 'username' => 'string|required|min:5|max:75', 'email' => 'email' ) ); var_dump($fail->passes(), $fail->errors());
Documentation
统计信息
- 总下载量: 184
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-05-11