improve HuBankAccountValidator.php, so it accepts also 16 long numbers

This commit is contained in:
Schneider Roland 2022-12-08 11:46:54 +01:00
parent 997a53e534
commit f72b4efc49

View File

@ -10,7 +10,7 @@ class HuBankAccountValidator
return false;
}
$stripedBankAccount = preg_replace('/\s+/', '', $bankAccount);
if ( strlen($stripedBankAccount) != 24){
if ( !(strlen($stripedBankAccount) == 24 || strlen($stripedBankAccount) == 16)){
return false;
}
$arrayOfNumbers = str_split($stripedBankAccount);