From f72b4efc497f278519a7f638b7831e4a81064271 Mon Sep 17 00:00:00 2001 From: Schneider Roland Date: Thu, 8 Dec 2022 11:46:54 +0100 Subject: [PATCH] improve HuBankAccountValidator.php, so it accepts also 16 long numbers --- common/models/HuBankAccountValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/models/HuBankAccountValidator.php b/common/models/HuBankAccountValidator.php index e93cf4c..f39bc31 100644 --- a/common/models/HuBankAccountValidator.php +++ b/common/models/HuBankAccountValidator.php @@ -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);