Skip to content

getBankAccountCheckDigits

elcapo edited this page Oct 17, 2014 · 2 revisions

getBankAccountCheckDigits calculates the check digits for an Spanish bank account. To calculate them, it needs the rest of the parts of the account.

Usage

/* MySQL */
SELECT getBankAccountCheckDigits( '1234', '1234', '1234567890' );
/* Returns 16 */
/* JavaScript */
var CD = getBankAccountCheckDigits( '1234', '1234', '1234567890' );
/* CD = 16 */
/* PHP */
$CD = getBankAccountCheckDigits( '1234', '1234', '1234567890' );
/* $CD = 16 */

Return values

  • [string] - Check digits corresponding to the account.
  • [empty] - If the string didn't match the expected pattern, returns empty.

Dependencies

In order to verify the structure of the string, this function uses respectsAccountPattern.

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