From c49572678cc3c5b2eecf7d7766d166c75f76f4e2 Mon Sep 17 00:00:00 2001 From: Marcel Naeve Date: Fri, 13 May 2016 16:03:57 +0200 Subject: [PATCH] regex fix in iban validation (length). --- Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validate.php b/Validate.php index 36e3956..f507bd8 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] . ',' . $country_length[$country] . '})$/', $iban, $matches)) { $checkNum = $matches[1]; $bban = strtoupper($matches[2]);