Validate_FI::bankAccount

Validate_FI::bankAccount() – Validate Finnish bank account number

Synopsis

require_once 'Validate/FI.php';

bool Validate_FI::bankAccount ( string $number )

Description

Validate Finnish bank account number. Format: XXXXXX-XXXXXXXX, 6 digits, - and 2-8 digits.

This method checks the bank account number according to Finnish Bank Association.

Parameter

string $number

Finnish bank account number to be validated

Return value

boolean - true if bank account is valid, false otherwise

Example

Using bankAccount()

<?php
// Include the package
require_once 'Validate/FI.php';

$bankAccount '159030-776';
if ( 
Validate_FI::bankAccount($bankAccount) ) {
    print 
'Valid';
} else {
    print 
'Not valid!';
}
?>