-
Notifications
You must be signed in to change notification settings - Fork 4
isValidIBAN
elcapo edited this page Oct 16, 2014
·
4 revisions
isValidIBAN
validates an IBAN by verifying its structure and check digits.
/* MySQL */
SELECT isValidIBAN( 'GB82WEST12345698765432' ); /* Returns 1 */
SELECT isValidIBAN( 'GB28WEST12345698765432' ); /* Returns 0 */
/* JavaScript */
var isValid = isValidIBAN( 'GB82WEST12345698765432' ); /* Returns 1 */
var isValid = isValidIBAN( 'GB28WEST12345698765432' ); /* Returns 0 */
/* PHP */
$isValid = isValidIBAN( 'GB82WEST12345698765432' ); /* Returns 1 */
$isValid = isValidIBAN( 'GB28WEST12345698765432' ); /* Returns 0 */
-
1
- If specified IBAN is correct. -
0
- Otherwise.
In order to check that the first two digits of the SEPA account correspond to a SEPA country, this function uses the isSepaCountry
function. In order to verify the length of the string, it uses getAccountLength
. Finally, in order to verify the check digits, it uses getIBANCheckDigits
.
This function is part of the [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN)) 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)