Issues

ZF-11849: Zend_Validate_PostCode and UK PostCodes

Description

Zend_Validate does not allow for spaces in UK post codes eg:

AA99 9AA

Unicode cldr allows for the space since version 1.9


GIR[ ]?0AA|((AB|AL|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\d{1,4}

ZF should be updated with the lasted version of unicode cldr.

This has been an annoying bug and has wasted several hours of debugging, just because a space is missing in the regex, which could of been fix ages ago by ZF.

Please can we have this updated now please. The offending file is Locale/Data/postalCodeData.xml

Comments

We will not change CLDR content due to legal issues for ZF when delivering such a changed version.

ZF2 is already using the latest CLDR release. Therefor closing this issue as fixed for next major release.

So aren't you allowed to just pop in the latest postalCodeData.xml from CLDR. I wasn't suggesting changing the content but updating the CLDR to the lastest release. Instead we have to wait for a major release. I don't think this is very good if this is the case.

So aren't you allowed to just pop in the latest postalCodeData.xml from CLDR. I wasn't suggesting changing the content but updating the CLDR to the lastest release. Instead we have to wait for a major release. I don't think this is very good if this is the case.

You don't need to comment twice the same.

Related to "popping". No, it is not a simple update of CLDR as from CLDR 1.8.1 to 1.9 several things have changed. The class must be reworked when a minor release change of CLDR is done. And we will not mix CLDR 1.8 with CLDR 1.9 as this could also lead to other problems.