wilsenhc / laravel-rif-validation
A Validation rule to check if a RIF is valid
Requires
- php: ^8.0
- illuminate/contracts: ^8.0|^9.0|^10.0
- illuminate/support: ^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0
- phpunit/phpunit: ^9.4
README
A Validation rule to check if a RIF is valid
This package provides rules to validate a RIF (Registro Único de Información Fiscal).
Installation
You can install the package via composer:
composer require wilsenhc/laravel-rif-validation
The package will automatically register itself.
Translations
If you wish to edit the package translations, you can run the following command to publish them into your lang/
folder
php artisan vendor:publish --provider="Wilsenhc\RifValidation\RifValidationServiceProvider"
Available rules
Rif
This validation rule will pass if the RIF value passed in the request is valid.
// in a `FormRequest` public function rules() { return [ 'rif' => 'required|rif', ]; }
You can also import the Rif
Rule class and use it instead
// in a `FormRequest` use Wilsenhc\RifValidation\Rules\Rif; public function rules() { return [ 'rif' => ['required', new Rif()], ]; }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email wilsenforwork@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.