https://github.com/wilsenhc/laravel-rif-validation
A Validation rule to check if a RIF is valid
https://github.com/wilsenhc/laravel-rif-validation
hacktoberfest laravel php rif rules seniat validation
Last synced: 5 months ago
JSON representation
A Validation rule to check if a RIF is valid
- Host: GitHub
- URL: https://github.com/wilsenhc/laravel-rif-validation
- Owner: wilsenhc
- License: mit
- Created: 2021-02-18T00:54:01.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-25T00:52:10.000Z (about 1 year ago)
- Last Synced: 2025-10-09T05:36:39.199Z (9 months ago)
- Topics: hacktoberfest, laravel, php, rif, rules, seniat, validation
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README

# A Validation rule to check if a RIF is valid
[](https://packagist.org/packages/wilsenhc/laravel-rif-validation)

[](https://packagist.org/packages/wilsenhc/laravel-rif-validation)
This package provides rules to validate a RIF (Registro Único de Información Fiscal).
## Installation
You can install the package via composer:
```bash
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
```bash
php artisan vendor:publish --provider="Wilsenhc\RifValidation\RifValidationServiceProvider"
```
## Available rules
- [`Rif`](#rif)
### `Rif`
This validation rule will pass if the RIF value passed in the request is valid.
```php
// in a `FormRequest`
public function rules()
{
return [
'rif' => 'required|rif',
];
}
```
You can also import the `Rif` Rule class and use it instead
```php
// in a `FormRequest`
use Wilsenhc\RifValidation\Rules\Rif;
public function rules()
{
return [
'rif' => ['required', new Rif()],
];
}
```
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email wilsenforwork@gmail.com instead of using the issue tracker.
## Credits
- [Wilsen Hernández](https://github.com/wilsenhc)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.