The vesperabr/validation
package provides an easy whay to validate input data.
It could be used in pure PHP or in Laravel projects.
You can install the package via composer:
$ composer require vesperabr/validation
The package will automatically register itself 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',
]);
}
- cnpj
- cpf
- cpf_ou_cnpj
- uf
use Vespera\Validation\Cpf;
$validation = Cpf::make('111.111.111-11')->validate();
Vespera\Validation\Cnpj
Vespera\Validation\Cpf
Vespera\Validation\CpfOuCnpj
Vespera\Validation\Uf
$ composer test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.