PHPackages                             wilsenhc/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/rif-validation

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

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

A Validation class to check if a RIF is valid

v1.0.0(1y ago)0811MITPHPPHP ^8.2CI passing

Since Apr 25Pushed 1y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

[![](https://camo.githubusercontent.com/8c7e727bf30e528444d6c8d849c57e464d352c68147e51f1f36399fb3a620ec5/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f52494625323056616c69646174696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d77696c73656e68632532467269662d76616c69646174696f6e267061747465726e3d63697263756974426f617264267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532467777772e7068702e6e6574253246696d616765732532466c6f676f732532466e65772d7068702d6c6f676f2e737667)](https://camo.githubusercontent.com/8c7e727bf30e528444d6c8d849c57e464d352c68147e51f1f36399fb3a620ec5/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f52494625323056616c69646174696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d77696c73656e68632532467269662d76616c69646174696f6e267061747465726e3d63697263756974426f617264267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532467777772e7068702e6e6574253246696d616765732532466c6f676f732532466e65772d7068702d6c6f676f2e737667)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/acaf06e97dd6e1a5c418a2a0fc9c3df4884b7b5f6e7e00f41c6060fc7eae9384/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696c73656e68632f7269662d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilsenhc/rif-validation)[![Tests](https://github.com/wilsenhc/rif-validation/actions/workflows/run-tests.yml/badge.svg)](https://github.com/wilsenhc/rif-validation/actions/workflows/run-tests.yml/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/c33e7642400d0b5cea5d5da8e965663e5e6010f5790a5eca5e3f6296024d9285/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77696c73656e68632f7269662d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilsenhc/rif-validation)

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

Overview
--------

[](#overview)

The `rif-validation` library provides a simple and efficient way to validate RIF (Registro de Información Fiscal) numbers in PHP. This library includes methods to check the validity of RIF numbers and retrieve error messages for invalid entries.

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

[](#installation)

You can install the library using Composer. Run the following command in your terminal:

```
composer require wilsenhc/rif-validation

```

Usage
-----

[](#usage)

To use the `Validation` class, include the autoloader and create an instance of the class:

```
require 'vendor/autoload.php';

use Wilsenhc\RifValidation\RifValidator;

$validator = new RifValidator();

if ($validator->isValid('RIF_NUMBER')) {
    echo "The RIF number is valid.";
} else {
    echo "The RIF number is NOT valid.";
}
```

Methods
-------

[](#methods)

- `isValid($rif)`: Validates the provided RIF number.

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

[](#contributing)

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for more details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance48

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

383d ago

### 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 (6 commits)")

---

Tags

hacktoberfestphprifseniatvalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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