From 73d6a33bf1411a31f2f5ecb10c10c21d87928f48 Mon Sep 17 00:00:00 2001 From: Marcel Naeve Date: Fri, 13 May 2016 16:25:14 +0200 Subject: [PATCH] fix in iban length validation. --- Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validate.php b/Validate.php index 36e3956..3377080 100644 --- a/Validate.php +++ b/Validate.php @@ -131,7 +131,7 @@ class Validate // The IBAN matches in length and basic structure? $matches = null; - if(mb_ereg_match('/^([A-Za-z]{2})(\d{2})([A-Za-z0-9]{' . $country_length[$country] . '})$/', $iban, $matches)) { + if(mb_ereg_match('/^([A-Za-z]{2})(\d{2})([A-Za-z0-9]{' . ($country_length[$country]-4) . '})$/', $iban, $matches)) { $checkNum = $matches[1]; $bban = strtoupper($matches[2]);