PHPackages                             ajgl/validator-es - 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. ajgl/validator-es

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

ajgl/validator-es
=================

Validation library for some Spanish codes.

0.1.7(1mo ago)13.7k↓21.4%[1 PRs](https://github.com/ajgarlag/AjglValidatorEs/pulls)MITPHPPHP &gt;=8.1CI passing

Since Nov 26Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ajgarlag/AjglValidatorEs)[ Packagist](https://packagist.org/packages/ajgl/validator-es)[ RSS](/packages/ajgl-validator-es/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (28)Versions (12)Used By (0)

AjglValidatorEs
===============

[](#ajglvalidatores)

This library provides some validators for common Spanish codes.

[![Build Status](https://github.com/ajgarlag/AjglValidatorEs/workflows/ci/badge.svg?branch=main)](https://github.com/ajgarlag/AjglValidatorEs/actions)[![Latest Stable Version](https://camo.githubusercontent.com/feff9d8ae1b8563e65cf69b882759bf0cd64fd9e87e8794d9b61ef823b74888d/68747470733a2f2f706f7365722e707567782e6f72672f616a676c2f76616c696461746f722d65732f76)](https://packagist.org/packages/ajgl/validator-es) [![Total Downloads](https://camo.githubusercontent.com/ac9e751aa2cbbca41e1fe8f905b9673b796165cfb48b1ef8da07bf430f5155a0/68747470733a2f2f706f7365722e707567782e6f72672f616a676c2f76616c696461746f722d65732f646f776e6c6f616473)](https://packagist.org/packages/ajgl/validator-es) [![Latest Unstable Version](https://camo.githubusercontent.com/6a30a9ef799f59f964f0987e6cc03709619cc74cd1c06ff6cf50a7d5e0deff30/68747470733a2f2f706f7365722e707567782e6f72672f616a676c2f76616c696461746f722d65732f762f756e737461626c65)](https://packagist.org/packages/ajgl/validator-es) [![License](https://camo.githubusercontent.com/d34ea0ebf0cb368834cfbdbed640766f22c67367824ff6c0a015d18dde6f3c93/68747470733a2f2f706f7365722e707567782e6f72672f616a676c2f76616c696461746f722d65732f6c6963656e7365)](https://packagist.org/packages/ajgl/validator-es) [![PHP Version Require](https://camo.githubusercontent.com/a5b564c130969bd6ca221f79ab6182e6ef14965f271af66b3649c540bed8efa0/68747470733a2f2f706f7365722e707567782e6f72672f616a676c2f76616c696461746f722d65732f726571756972652f706870)](https://packagist.org/packages/ajgl/validator-es)

Current supported codes to validate are:

- [DNI](http://es.wikipedia.org/wiki/Documento_de_identidad#Espa.C3.B1a)
- [NIE](http://es.wikipedia.org/wiki/NIE)
- IdCard (DNI or NIE)
- [CCC](https://es.wikipedia.org/wiki/C%C3%B3digo_cuenta_cliente)
- [IBAN](https://es.wikipedia.org/wiki/International_Bank_Account_Number#En_Espa%C3%B1a) (Limited to Spanish accounts)

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

[](#installation)

```
composer require ajgl/validator-es
```

Usage
-----

[](#usage)

All validators implements a common interface with only one method:

```
