2017 © Pedro Peláez
 

library validator-cif-nif-nie

Validator for Spanish National documents (CIF, NIF, NIE)

image

skilla/validator-cif-nif-nie

Validator for Spanish National documents (CIF, NIF, NIE)

  • Wednesday, April 26, 2017
  • by skilla
  • Repository
  • 3 Watchers
  • 9 Stars
  • 2,904 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 8 Versions
  • 37 % Grown

The README.md

ValidatorCifNifNie

Validator for Spanish National documents (CIF, NIF, NIE), (*1)

Latest Stable Version Build Status Total Downloads Latest Unstable Version License composer.lock codecov, (*2)

[Installation | Instalación]

composer require skilla/validator-cif-nif-nie, (*3)

[Description | Descripción]

The identity documents in Spain are composed of 9 alphanumeric digits with different formats, their generic form is 1 => [alphanumeric] + 7 => [numeric] +1 => [alphanumeric], (*4)

The validator has four simple methods to validate only the format (length and combination of letters and numbers) and three additional composite methods that make validations by groups, personal documents, documents of legal organizations and a third method that validates all kinds of Identification documents., (*5)

  • isDNIFormat => To validate the format of the document identifiers of Spanish people.
  • isNIEFormat => To validate the format of the document identifiers of foreign persons residing in Spain.
  • isNIFFormat => To validate the format of the document identifiers of Spanish or foreign persons in special situations.
  • isPersonalFormat => To validate the format of the document identifiers of any of the three types above.
  • isCIFFormat => To validate the format of document identifiers of Spanish or foreign organizations with the Spanish Tax Identification Code.
  • isValidFormat => To validate the format of document identifiers of individuals or organizations with the Spanish Tax Identification Code.

It also has 5 methods to validate that the identifier, including the check digit is correct., (*6)

  • isValidDNI => To validate the document identifiers of Spanish people.
  • isValidNIE => To validate the document identifiers of foreign persons residing in Spain.
  • isValidNIF => To validate the document identifiers of Spanish or foreign persons in special situations.
  • isValidCIF => To validate the document identifiers of Spanish or foreign organizations with the Spanish Tax Identification Code.
  • validate => To validate the document identifiers of individuals or organizations with the Spanish Tax Identification Code.

Los documentos de identidad en España están compuestos de 9 dígitos alfanuméricos con distintos formatos, su forma genérica es 1=>[alfanumérico] + 7=>[numéricos] +1=>[alfanumérico], (*7)

El validador dispone de cuatro métodos simples para validar únicamente el formato (longitud y combinación de letras y números) y tres métodos compuestos adicionales que hacen validaciones por grupos, los documentos personales, los documentos de organizaciones jurídicas y un tercero método que valida todo tipo de documentos de identificación., (*8)

  • isDNIFormat => Para validar el formato de los identificadores de documentos de personas españoles.
  • isNIEFormat => Para validar el formato de los identificadores de documentos de personas extranjeras residentes en España.
  • isNIFFormat => Para validar el formato de los identificadores de documentos de personas Españolas o extranjeras en situaciones especiales.
  • isPersonalFormat => Para validar el formato de los identificadores de documentos de cualquiera de los tres tipos anteriores.
  • isCIFFormat => Para validar el formato de los identificadores de documentos de organizaciones Españolas o extranjeras con Código de identificación fiscal de España.
  • isValidFormat => Para validar el formato de los identificadores de documentos de personas u organizaciones con Código de identificación fiscal de España.

También dispone de 5 métodos para validar que el identificador, incluido el dígito de control sea correcto., (*9)

  • isValidDNI => Para validar los identificadores de documentos de personas españoles.
  • isValidNIE => Para validar los identificadores de documentos de personas extranjeras residentes en España.
  • isValidNIF => Para validar los identificadores de documentos de personas Españolas o extranjeras en situaciones especiales.
  • isValidCIF => Para validar los identificadores de documentos de organizaciones Españolas o extranjeras con Código de identificación fiscal de España.
  • validate => Para validar los identificadores de documentos de personas u organizaciones con Código de identificación fiscal de España.

Examples | Ejemplos, (*10)

The Versions

26/04 2017

dev-master

9999999-dev

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

19/02 2017

1.0.6

1.0.6.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

14/11 2016

1.0.5

1.0.5.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

14/11 2016

1.0.4

1.0.4.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

13/11 2016

1.0.3

1.0.3.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

11/11 2016

1.0.2

1.0.2.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

11/11 2016

1.0.1

1.0.1.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa

11/11 2016

1.0.0

1.0.0.0

Validator for Spanish National documents (CIF, NIF, NIE)

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergio Zambrano Delfa