Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Spanish Bank Accounts

elcapo edited this page Oct 16, 2014 · 4 revisions

This set of functions helps when working with Spanish bank accounts. They are useful for validating and calculating check digits, as long as validating the string pattern.

Code and tests

Validate Account Numbers

isValidAccountNumber allow us to easily check a Spanish bank account number. It gets the account parts as parameters and returns 0 (false) or 1 (true), after validating both the formats and corresponding check digits.

respectsAccountPattern checks the structure of the different parts of an Spanish bank account and makes sure they aren't any unwanted characters.

Obtain Information

A function allow us to obtain the check digits for an Spanish bank account: getBankAccountCheckDigits, when having the rest of the numbers.

SEPA validations

  • [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN))

Spanish validations

Helpers

  • [Common functions](Common functions)

Clone this wiki locally