-
Notifications
You must be signed in to change notification settings - Fork 4
isSepaCountry
elcapo edited this page Oct 16, 2014
·
4 revisions
isSepaCountry
helps to check the first two digits of an IBAN. These two digits are referring to the country where the account was created, so they only can correspond to one of the countries in the Single Euro Payments Area (SEPA) area.
A document with a full list of the SEPA countries, its corresponding IBAN structures and more is available at the Swift website as IBAN Registry.
/* MySQL */
SELECT isSepaCountry( 'ES' ); /* Returns 1 */
SELECT isSepaCountry( 'CN' ); /* Returns 0 */
/* JavaScript */
var isSEPA = isSepaCountry( 'ES' ); /* isSEPA = 1 */
var isSEPA = isSepaCountry( 'CN' ); /* isSEPA = 0 */
/* PHP */
$isSEPA = isSepaCountry( 'ES' ); /* $isSEPA = 1 */
$isSEPA = isSepaCountry( 'CN' ); /* $isSEPA = 0 */
-
1
- If specified country is part of the SEPA. -
0
- Otherwise.
In order to say if an account is a SEPA account, or not, this function checks if there is a predefined IBAN length for the given country. To do so, it uses getAccountLength
.
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)