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
isValidNIE
elcapo edited this page Oct 16, 2014
·
3 revisions
isValidNIE validates the check digits of an identification number, after verifying the string structure actually fits the NIE pattern.
/* MySQL */
SELECT isValidNIE( 'X6089822C' ); /* Returns 1 */
SELECT isValidNIE( 'X6089822X' ); /* Returns 0 *//* JavaScript */
var isValid = isValidNIE( 'X6089822C' ); /* isValid = 1 */
var isValid = isValidNIE( 'X6089822X' ); /* isValid = 0 *//* PHP */
$isValid = isValidNIE( 'X6089822C' ); /* $isValid = 1 */
$isValid = isValidNIE( 'X6089822X' ); /* $isValid = 0 */-
1- If specified NIE is correct. -
0- Otherwise.
In order to verify the format of the string received as parameter, this function uses isValidNIEFormat. In order to check the written digit, it actually uses isValidNIF.
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)