Page 1 of 1

Incorrect postal code regex for GBR

Posted: Wed Apr 01, 2020 9:35 am
by gtb
The postal code regex for GBR is incorrect. It should be something of the form: [A-Z]{1,2}[0-9][A-Z0-9]?

Re: Incorrect postal code regex for GBR

Posted: Tue Apr 21, 2020 7:33 am
by rkulagow
If the consensus is that the regex should be updated, then I'll update the code.

Anyone else want to weigh-in?

Re: Incorrect postal code regex for GBR

Posted: Tue Apr 21, 2020 8:01 am
by gtb
rkulagow wrote:
Tue Apr 21, 2020 7:33 am
If the consensus is that the regex should be updated, then I'll update the code.

Anyone else want to weigh-in?
I'll note that the full regex for GBR postal codes is more extended/complicated (sort of like the US with zip+4 but with variable lengths and characters and numbers), but the real question is what regex works for the postal codes you have in the database. The proposed regex seemed to work for a few random GBR postal codes I know, but I do not have visibility into your full source list.

Also I can't seem to get any FRA postal codes to work for a selection regardless of whether it validates to the regex, but I have even less visitility into FRA postal codes.

Given I rarely try using non-US postal codes (except for testing), I have not done any extensive testing to know if these are country specific issues, or a more general issue with the regex's provided.

So, I guess the real question is does Schedules Direct have a method to use its regex to determine if it works with the postal codes it has to identify anomalies?