Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bahrain (BH) postcode regex incorrect #157

Closed
BenWalters opened this issue Jan 21, 2021 · 6 comments
Closed

Bahrain (BH) postcode regex incorrect #157

BenWalters opened this issue Jan 21, 2021 · 6 comments

Comments

@BenWalters
Copy link

Hi,

I believe the postcode regex for Bahrain to be incorrect. It is currently (?:\d|1[0-2])\d{2} however I've found that postcodes are:

Valid post code numbers are 101 to 1216 with gaps in the range. Known as block number (Arabic: رقم المجمع‎) formally. The first digit in NNN format and the first two digits in NNNN format refer to one of the 12 municipalities of the country. PO Box address doesn't need a block number or city name, just the PO Box number followed by the name of the country, Bahrain.

I see this was previously raised though I'm not sure it was resolved. #91

@BenWalters
Copy link
Author

@bojanz Do you have any thoughts on this?

@bojanz
Copy link
Contributor

bojanz commented Jan 30, 2021

Addressing just repackages Google data, so you can suggest a new regexp at https://github.com/google/libaddressinput/issues

Once an issue is open there, I can also add a ibrary override on this side, so that the new data is used before Google makes the change on their end.

@BenWalters
Copy link
Author

Thanks @bojanz I will get an issue raised there now.

@BenWalters
Copy link
Author

Issue raised: google/libaddressinput#207
Also I found another source to backup the previous statement: https://en.youbianku.com/Bahrain

@BenWalters
Copy link
Author

@bojanz are you able to implement an override?
The suggested regex is:
(?:^|\b)(?:1[0-2]|[1-9])\d{2}(?:$|\b)

@BenWalters
Copy link
Author

@bojanz are you able to merge the PR and tag a release for this change please?

@bojanz bojanz closed this as completed in 00c263f Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants