fix in iban validation - sanitize.

This commit is contained in:
Marcel Naeve 2016-05-13 14:32:38 +02:00
parent fd5b05cffd
commit 0d15c0cb15
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class Validate
"ES" => 24, "SE" => 24, "CH" => 21, "TN" => 24, "TR" => 26, "AE" => 23, "GB" => 22, "VG" => 24 "ES" => 24, "SE" => 24, "CH" => 21, "TN" => 24, "TR" => 26, "AE" => 23, "GB" => 22, "VG" => 24
]; ];
$iban = mb_ereg_replace("/\s\-/", "", $iban); // sanitize for validation (remove spaces) $iban = mb_ereg_replace("/(\s|\-)/", "", $iban); // sanitize for validation (remove spaces)
$country = mb_strtoupper(mb_substr($iban, 0, 2)); $country = mb_strtoupper(mb_substr($iban, 0, 2));
// we know the country the IBAN belongs to? // we know the country the IBAN belongs to?