The Empari Validation package.
Execute the following command to get the latest version of the package:
composer require empari/validation
In your config/app.php
add Empari\Validation\ValidationServiceProvider::class
to the end of the providers
array:
'providers' => [
...
Empari\Validation\ValidationServiceProvider::class,
],
Run commands for validation:
echo app('validation.cnpj')->validate('66.204.558/0001-05');
echo app('validation.cpf')->validate('628.786.185-13');
echo app('validation.cnpjcpf')->validate('62878618513');
echo app('validation.credit_card')->validate('5502232564641117');
echo app('validation.insc_estadual')->validate('pr', '70.103.83.63-8');