Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Wrong regex pattern in Zend_Validate_Iban class #641

Closed
ladjack opened this issue Nov 16, 2015 · 1 comment
Closed

Wrong regex pattern in Zend_Validate_Iban class #641

ladjack opened this issue Nov 16, 2015 · 1 comment
Assignees
Milestone

Comments

@ladjack
Copy link

ladjack commented Nov 16, 2015

The Zend_Validate_Iban has an invalid regex pattern for Macedonia country which looks like this:

'MK' => '/^MK[0-9]{2}[A-Z]{3}[A-Z0-9]{10}[0-9]{2}$/'

However according to http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf the bank identifier part must contain only numeric characters (3 digits exactly), rather than letters. So instead that regex pattern should look like:

'MK' => '/^MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}$/'

That way sample IBAN MK07250120000058984 for Macedonia will pass validation. You can test this sample IBAN on https://www.iban.com for instance.

@froschdesign
Copy link
Member

@ladjack
Thanks for reporting!

@froschdesign froschdesign self-assigned this Feb 5, 2016
tavy315 added a commit to tavy315/zendframework1 that referenced this issue Feb 11, 2016
…lass

invalid regex pattern for Macedonia
dgiotas pushed a commit to tripsta/zf1 that referenced this issue Jun 17, 2016
…lass

invalid regex pattern for Macedonia
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants