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

isValidAccountNumber

elcapo edited this page Oct 16, 2014 · 2 revisions

isValidAccountNumber validates an Spanish bank account by verifying its structure and check digits.

Usage

/* MySQL */
SELECT isValidAccountNumber( '1234', '1234', '16', '1234567890' );
/* Returns 1 */
/* JavaScript */
var isValid = isValidAccountNumber( '1234', '1234', '16', '1234567890' );
/* isValid = 1 */
/* PHP */
$isValid = isValidAccountNumber( '1234', '1234', '16', '1234567890' );
/* @isValid = 1 */

Return values

  • 1 - If specified Spanish bank account is correct.
  • 0 - Otherwise.

Dependencies

In order to verify the structure of the string, this function uses respectsAccountPattern. Finally, in order to verify the check digits, it uses getBankAccountCheckDigits.

Category

This function is part of the [Spanish Bank Accounts](Spanish Bank Accounts) package.

SEPA validations

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

Spanish validations

Helpers

  • [Common functions](Common functions)
Clone this wiki locally