globalinnovation / laravel-cuit-validation-rule
Rule for the validation of the CUIT (Argentina) within Laravel Validator.
1.4.0
2021-07-07 16:58 UTC
Requires
- php: >=7.0.0
- laravel/laravel: >=5.6.0 <=5.8
README
Installation
To install this package include it in your composer.json
composer require globalinnovation/laravel-cuit-validation-rule
Add the following lines to the boot
method of the AppServiceProvider
class (Check Laravel documentation):
Validator::extend('cuit', 'GlobalInnovation\Validation\Rules\CUIT@validate'); Validator::replacer('cuit', "The CUIT is invalid.");
Remember to add the following line bellow namespace
line of the AppServiceProvider
class:
use Illuminate\Support\Facades\Validator;