vesperabr/validation
Composer 安装命令:
composer require vesperabr/validation
包简介
A awesome set of PHP validation classes.
README 文档
README
The vesperabr/validation package provides an easy whay to validate input data.
It could be used in pure PHP or in Laravel projects.
Installation
You can install the package via composer:
$ composer require vesperabr/validation
The package will automatically register itself in Laravel.
How to use in Laravel
All you need to do is append the rule to your rules list.
public function store(Request $request) { $validated = $request->validate([ 'cpf' => 'required|cpf', ]); }
Available rules
- cnpj
- cpf
- cpf_ou_cnpj
- uf
How to use in PHP
use Vespera\Validation\Cpf; $validation = Cpf::make('111.111.111-11')->validate();
Avaiable classes
Vespera\Validation\CnpjVespera\Validation\CpfVespera\Validation\CpfOuCnpjVespera\Validation\Uf
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-13