Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 4b46967

Browse files
committed
Fixes zendframework#641 - Wrong regex pattern in Zend_Validate_Iban class
invalid regex pattern for Macedonia
1 parent c9e18a0 commit 4b46967

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

library/Zend/Validate/Iban.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Zend_Validate_Iban extends Zend_Validate_Abstract
107107
'MC' => '/^MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}$/',
108108
'MD' => '/^MD[0-9]{2}[A-Z0-9]{20}$/',
109109
'ME' => '/^ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}$/',
110-
'MK' => '/^MK[0-9]{2}[A-Z]{3}[A-Z0-9]{10}[0-9]{2}$/',
110+
'MK' => '/^MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}$/',
111111
'MR' => '/^MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}$/',
112112
'MU' => '/^MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{2}$/',
113113
'MT' => '/^MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}$/',

tests/Zend/Validate/IbanTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,13 @@ public function testIbanNotSupported()
8080
$validator = new Zend_Validate_Iban('en_US');
8181
$this->assertFalse($validator->isValid('AT611904300234573201'));
8282
}
83+
84+
/**
85+
* @group GH-641
86+
*/
87+
public function testIbanOfMacedonia()
88+
{
89+
$validator = new Zend_Validate_Iban();
90+
$this->assertTrue($validator->isValid('MK07250120000058984'));
91+
}
8392
}

0 commit comments

Comments
 (0)