PHPackages                             experteam/indentification-number-validator - 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. experteam/indentification-number-validator

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

experteam/indentification-number-validator
==========================================

PHP library for validating identification documents from multiple countries

1.0.6(3mo ago)0330↓50%MITPHPPHP &gt;=8.0

Since Dec 3Pushed 3mo agoCompare

[ Source](https://github.com/experteam-mx/indentification-number-validator)[ Packagist](https://packagist.org/packages/experteam/indentification-number-validator)[ Docs](https://github.com/experteam-mx/indentification-number-validator.git)[ RSS](/packages/experteam-indentification-number-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

Identification Number Validator
===============================

[](#identification-number-validator)

A PHP library for validating identification numbers from multiple countries.
Provides a simple and unified interface for validating official national documents.

Install
-------

[](#install)

```
composer require experteam/indentification-number-validator

```

Update
------

[](#update)

```
composer update experteam/indentification-number-validator

```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use Experteam\IndentificationNumberValidator\ValidatorFactory;

$validator = ValidatorFactory::make('MX'); // Mexico example

$result = $validator->validate([
    'identificationNumber' => 'GODE561231GR8',
    'identificationCode'   => 'RFC'
]);
```

Supported Countries
-------------------

[](#supported-countries)

Supported Countries
-------------------

[](#supported-countries-1)

CountryCodeValidator ClassBrasilBRBRValidatorGUATEMALAGTGTValidatorMore countries can be added easily.

Adding a New Country
--------------------

[](#adding-a-new-country)

1. Create a new validator inside `src/Validators/`.

```
use Experteam\IndentificationNumberValidator\Contracts\IdentificationValidatorInterface;

class BRValidator implements IdentificationValidatorInterface
{
    public function validate(string $number): array
    {
        return [true, "{$name} is valid."];
    }
}
```

2. Register the validator in `ValidatorFactory.php`:

```
case 'CO':
    return new COValidator();
```

Error Handling
--------------

[](#error-handling)

```
use Experteam\IndentificationNumberValidator\Exceptions\UnsupportedCountryException;

try {
    ValidatorFactory::make('XX');
} catch (UnsupportedCountryException $e) {
    echo $e->getMessage();
}
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance80

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Every ~10 days

Total

7

Last Release

105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7440c23497ad6e1715a163303dad11dbf1cc25647f803a594bab662db4a3bd3?d=identicon)[experteam-mx](/maintainers/experteam-mx)

---

Top Contributors

[![experteam-mx](https://avatars.githubusercontent.com/u/76792454?v=4)](https://github.com/experteam-mx "experteam-mx (1 commits)")

---

Tags

validatoridentificationexperteam

### Embed Badge

![Health badge](/badges/experteam-indentification-number-validator/health.svg)

```
[![Health](https://phpackages.com/badges/experteam-indentification-number-validator/health.svg)](https://phpackages.com/packages/experteam-indentification-number-validator)
```

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k217.8M205](/packages/seld-jsonlint)[composer/spdx-licenses

SPDX licenses list and validation library.

1.4k184.2M25](/packages/composer-spdx-licenses)[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15644.9M188](/packages/laminas-laminas-validator)

PHPackages © 2026

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