/ Published in: PHP
URL: validate_iban
This PHP function checks if a given string is a valid International Banking Acount Number (IBAN).
Expand |
Embed | Plain Text
< function _isValidIBAN($data, $reformat = true, $countryCode=null, $printErrors=false){ $str = $data['account_number']; if($reformat){ } $errors[] = 'Invalid string length'; } $errors[] = 'Invalid chars at 0, 1'; } $errors[] = 'Invalid chars at 3, 4'; } } } } $tmpValue *= 10; $tmpValue %= 97; } if ($tmpValue != 1) { $errors[] = 'Invalid checksum'; } if($printErrors){ } return true; } } return false; }
You need to login to post a comment.
