This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
getIdType
elcapo edited this page Oct 16, 2014
·
2 revisions
getIdType returns a description of the type of the given document number. When possible, the description has been taken from an official source. In all cases, the returned string will be in Spanish.
/* MySQL */
SELECT getIdType( 'Q2085360B' ); /* Returns Organismo público */
SELECT getIdType( 'A60496296' ); /* Returns Sociedad Anónima *//* JavaScript */
var type = getIdType( 'Q2085360B' ); /* type = Organismo público */
var type = getIdType( 'A60496296' ); /* type = Sociedad Anónima *//* PHP */
$type = getIdType( 'Q2085360B' ); /* $type = Organismo público */
$type = getIdType( 'A60496296' ); /* $type = Sociedad Anónima */-
[string]- Spanish description corresponding to the document type of the given string. -
[empty]- If the given number doesn't math a NIF, NIE or CIF pattern, returns an empty string.
In order to verify the format of the string received as parameter, this function uses isValidNIFFormat, isValidNIEFormat and isValidCIFFormat.
This function is part of the NIF, NIE & CIF package.
Go back home!
SEPA validations
- [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN))
Spanish validations
- NIF, NIE & CIF
- [Spanish Bank Accounts](Spanish Bank Accounts)
Helpers
- [Common functions](Common functions)