PHPackages                             wilsenhc/laravel-rif-validation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. wilsenhc/laravel-rif-validation

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

wilsenhc/laravel-rif-validation
===============================

A Validation rule to check if a RIF is valid

v2.0.1(1y ago)10683MITPHPPHP ^8.2

Since Feb 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wilsenhc/laravel-rif-validation)[ Packagist](https://packagist.org/packages/wilsenhc/laravel-rif-validation)[ RSS](/packages/wilsenhc-laravel-rif-validation/feed)WikiDiscussions main Synced today

READMEChangelog (9)Dependencies (5)Versions (10)Used By (0)

[![](https://camo.githubusercontent.com/80233f400b8e9573d4458deb0220986161246f4684e8e4d1a0f236b569fb924c/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323052494625323056616c69646174696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d77696c73656e68632532466c61726176656c2d7269662d76616c69646174696f6e267061747465726e3d63697263756974426f617264267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/80233f400b8e9573d4458deb0220986161246f4684e8e4d1a0f236b569fb924c/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323052494625323056616c69646174696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d77696c73656e68632532466c61726176656c2d7269662d76616c69646174696f6e267061747465726e3d63697263756974426f617264267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

A Validation rule to check if a RIF is valid
============================================

[](#a-validation-rule-to-check-if-a-rif-is-valid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/27151c2e8ab530c4c472c4b7797a8a703bdb46f0639b93f964381a8ef01bd5ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696c73656e68632f6c61726176656c2d7269662d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilsenhc/laravel-rif-validation)[![Tests](https://github.com/wilsenhc/laravel-rif-validation/actions/workflows/run-tests.yml/badge.svg)](https://github.com/wilsenhc/laravel-rif-validation/actions/workflows/run-tests.yml/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/36bf634088f939b9acaa02011e0ff53588ed77da1b0fa1772e1913799a368b8a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77696c73656e68632f6c61726176656c2d7269662d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilsenhc/laravel-rif-validation)

This package provides rules to validate a RIF (Registro Único de Información Fiscal).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require wilsenhc/laravel-rif-validation
```

The package will automatically register itself.

### Translations

[](#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
---------------

[](#available-rules)

- [`Rif`](#rif)

### `Rif`

[](#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

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Wilsen Hernández](https://github.com/wilsenhc)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance44

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~190 days

Recently: every ~255 days

Total

9

Last Release

436d ago

Major Versions

v0.1.0 → v1.0.02021-03-10

v1.4.0 → v2.0.02025-04-25

PHP version history (3 changes)v0.1.0PHP ^7.3|^8.0

v1.4.0PHP ^8.0

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/537be15e22d4f3340e5219d3679a17741ef27625c437072312143a71cf0a8ce4?d=identicon)[wilsenhc](/maintainers/wilsenhc)

---

Top Contributors

[![wilsenhc](https://avatars.githubusercontent.com/u/13445515?v=4)](https://github.com/wilsenhc "wilsenhc (56 commits)")

---

Tags

hacktoberfestlaravelphprifrulesseniatvalidationseniatrifwilsenhclaravel-rif-validationlaravel-validar-rif

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wilsenhc-laravel-rif-validation/health.svg)

```
[![Health](https://phpackages.com/badges/wilsenhc-laravel-rif-validation/health.svg)](https://phpackages.com/packages/wilsenhc-laravel-rif-validation)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M203](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.6k14](/packages/tallstackui-tallstackui)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
