PHPackages                             interficie/laravel-spanishid - 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. interficie/laravel-spanishid

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

interficie/laravel-spanishid
============================

Check spanish identity numbers (DNI, CIF, NIE, NIF, SSN)

v1.2(1y ago)06.7kMITPHPPHP &gt;=7.1CI failing

Since May 7Pushed 1y ago2 watchersCompare

[ Source](https://github.com/InterficieIS/laravel-spanishid)[ Packagist](https://packagist.org/packages/interficie/laravel-spanishid)[ RSS](/packages/interficie-laravel-spanishid/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

SpanishID for Laravel 6.X|7.X
=============================

[](#spanishid-for-laravel-6x7x)

Library to add validations for spanish state-emitted identity document numbers, including NIF, CIF, NIE and Social Security Number (SSN).

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

[](#installation)

Require this package with composer:

```
composer require interficie/identity

```

Usage
-----

[](#usage)

You can now check a document using the Facade:

```
SpanishID::isValidDni('1234foo');
SpanishID::isValidCif('1234foo');
SpanishID::isValidNie('1234foo');
SpanishID::isValidNNSS('1234foo');
```

You can also use these as validation rules:

```
$rules = [
    'dni_field' => 'dni',
    'cif_field' => 'cif',
    'nie_field' => 'nie',
    'nif_field' => 'nif',
    'nnss_field' => 'nnss',
];
```

Thanks
------

[](#thanks)

- The original laravel package by mpijierro
- The original code for NIF, CIF AND NIE is in next link:

- Thanks to original code for the validation of the NNSS of:
    [http://intervia.com/doc/validar-numeros-de-la-seguridad-social/](http://intervia.com)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~827 days

Total

3

Last Release

543d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11547196?v=4)[Mike Pujol](/maintainers/mpujol)[@mpujol](https://github.com/mpujol)

---

Top Contributors

[![kilburn](https://avatars.githubusercontent.com/u/116100?v=4)](https://github.com/kilburn "kilburn (4 commits)")[![jjinterficie](https://avatars.githubusercontent.com/u/76481686?v=4)](https://github.com/jjinterficie "jjinterficie (2 commits)")

---

Tags

SsnCIFNIFspanishspainDNIespañaNIE

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/interficie-laravel-spanishid/health.svg)

```
[![Health](https://phpackages.com/badges/interficie-laravel-spanishid/health.svg)](https://phpackages.com/packages/interficie-laravel-spanishid)
```

###  Alternatives

[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8013.3M23](/packages/ronanguilloux-isocodes)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)[ulabox/nif-validator

Yet another(?) PHP implementation of the spanish NIF validator

25118.6k1](/packages/ulabox-nif-validator)[bayareawebpro/laravel-multistep-forms

Responsable MultiStep Form Builder for Laravel.

967.9k](/packages/bayareawebpro-laravel-multistep-forms)[tecactus/reniec-php

RENIEC package for PHP

118.4k](/packages/tecactus-reniec-php)[overtrue/laravel-text-guard

TextGuard：可作 Rule 也可单用的字符串清洗/规范化工具

122.4k](/packages/overtrue-laravel-text-guard)

PHPackages © 2026

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