PHPackages                             torralbodavid/identity-card-checker - 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. torralbodavid/identity-card-checker

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

torralbodavid/identity-card-checker
===================================

Use this package to validate the identity card number from your country

2.0.2(4y ago)1241MITPHPPHP ^8.0

Since Nov 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/torralbodavid/identity-card-checker)[ Packagist](https://packagist.org/packages/torralbodavid/identity-card-checker)[ Docs](https://github.com/torralbodavid/identity-card-checker)[ GitHub Sponsors](https://github.com/torralbodavid)[ RSS](/packages/torralbodavid-identity-card-checker/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (9)Versions (8)Used By (0)

Identity Card Checker Laravel Validation Rules
==============================================

[](#identity-card-checker-laravel-validation-rules)

[![Latest Stable Version](https://camo.githubusercontent.com/fa68b65c82867d87dd0d87145d0b588f0704bba7ef3e3ac61f14b1875627be18/687474703a2f2f706f7365722e707567782e6f72672f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f76)](https://packagist.org/packages/torralbodavid/identity-card-checker)[![Total Downloads](https://camo.githubusercontent.com/10193d35d1194e8fec3c3ceba291d3c2f3db5279788dd134f43f7b532f51f9d3/687474703a2f2f706f7365722e707567782e6f72672f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f646f776e6c6f616473)](https://packagist.org/packages/torralbodavid/identity-card-checker)[![License](https://camo.githubusercontent.com/0e399e804412ef0c44a00a62e59ff5b40a3cec330decef19a47ffe96e624236c/687474703a2f2f706f7365722e707567782e6f72672f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f6c6963656e7365)](https://packagist.org/packages/torralbodavid/identity-card-checker) [![PHP Version Require](https://camo.githubusercontent.com/bd3809817e7af655c6d4215728281bd8497a8c6f91f05e6bf942f053b34b24ed/687474703a2f2f706f7365722e707567782e6f72672f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f726571756972652f706870)](https://packagist.org/packages/torralbodavid/identity-card-checker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/75f1809582a5ef7f828b150d4937567a8799681c4329c83d0b0188342ff59da3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/torralbodavid/identity-card-checker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c3f57f8b60e6927bf241feac929e5917680b6a979cb6822162907dc99dc594e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f7272616c626f64617669642f6964656e746974792d636172642d636865636b65722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/torralbodavid/identity-card-checker/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)

Use this package to validate the identity card number from your country

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

[](#installation)

You can install the package via composer:

```
composer require torralbodavid/identity-card-checker
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Torralbodavid\IdentityCardChecker\IdentityCardCheckerServiceProvider" --tag="identity-card-checker-config"
```

Usage
-----

[](#usage)

🇪🇸 Currently we are only supporting validation of Spanish documents: DNI, NIE and CIF.

Feel free to open an issue if you want your country id to be supported or also open a pull request.

Add the following rule on your form validation:

```
    use Torralbodavid\IdentityCardChecker\Rules\IdCardES;

    $request->validate([
        ...
        'id_validation' => new IdCard('es'),
    ]);
```

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 Vulnerabilities
------------------------

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [David Torralbo](https://github.com/torralbodavid)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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 ~0 days

Total

5

Last Release

1698d ago

Major Versions

1.0.1 → 2.0.02021-11-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdbe60d3927b258f7da4a406a474892d52eb7eca924217ad5754c612b2805d0d?d=identicon)[torralbo](/maintainers/torralbo)

---

Top Contributors

[![torralbodavid](https://avatars.githubusercontent.com/u/17132682?v=4)](https://github.com/torralbodavid "torralbodavid (37 commits)")

---

Tags

cifdnilaravelnieruleslaraveltorralbodavididentity-card-checker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/torralbodavid-identity-card-checker/health.svg)

```
[![Health](https://phpackages.com/badges/torralbodavid-identity-card-checker/health.svg)](https://phpackages.com/packages/torralbodavid-identity-card-checker)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M96](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k36](/packages/spatie-laravel-passkeys)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)

PHPackages © 2026

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