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
isValidCIFFormat
elcapo edited this page Oct 16, 2014
·
4 revisions
isValidCIFFormat tests a string against a regexp pattern to see if the string fits the CIF structure.
/* MySQL */
SELECT isValidCIFFormat( 'H24930836' ); /* Returns 1 */
SELECT isValidCIFFormat( '1A1A1A1A' ); /* Returns 0 *//* JavaScript */
var isValid = isValidCIFFormat( 'H24930836' ); /* Returns 1 */
var isValid = isValidCIFFormat( '1A1A1A1A' ); /* Returns 0 *//* PHP */
$isValid = isValidCIFFormat( 'H24930836' ); /* Returns 1 */
$isValid = isValidCIFFormat( '1A1A1A1A' ); /* Returns 0 */-
1- If the string fits the pattern. -
0- Otherwise.
In order to facilitate the regexp test, this function uses respectsDocPattern.
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)