-
Notifications
You must be signed in to change notification settings - Fork 4
International Bank Account Numbers (IBAN)
IBAN are the initials for International Bank Account Number, a new standard adopted by (basically) the European Union to simplify communications between banks.
In general, an IBAN is build by adding the two characters of the ISO code of the country where the account was created, plus two additional check digits. For instance, the Spanish bank account number 1234 5678 06 1234567890
corresponds with the IBAN ES68 1234 5678 0612 3456 7890
.
These functions can help both to calculate the corresponding check digits and to validate the digits of a given account.
- The translations for this functions are available for JavaScript, MySQL and PHP.
- The tests are available for JavaScript, MySQL (prefix
iban-
) and PHP.
isValidIBAN
allow us to easily check an IBAN. It gets a string as parameter and returns 0
(false) or 1
(true), after validating both the formats and corresponding check digits.
These functions allow us to obtain useful information to work with IBANs. The getIBANCheckDigits
function, for instance, returns the check digits for a given IBAN.
Other related functions are getAccountLength
and getGlobalIdentifier
.
Some functions have been written just to be used by other functions but they can still be called directly. For instance, isSepaCountry
, replaceCharactersNotInPattern
and replaceLetterWithDigits
.
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)