libphonenumber-for-php icon indicating copy to clipboard operation
libphonenumber-for-php copied to clipboard

Case sensitive isValidRegionCode function

Open blacklizard opened this issue 2 years ago • 2 comments

The function isValidRegionCode should accept region/country code in both lower case and upper case as per google/libphonenumber

Reference https://github.com/google/libphonenumber/blob/7f20d4f7c26bb5d23f2caf86ec37d60f992a3031/javascript/i18n/phonenumbers/phonenumberutil.js#L1671

If this issue is acceptable, I will create a PR

blacklizard avatar Nov 29 '21 09:11 blacklizard

Good spot, thanks.

Please do submit a PR. Are there any other places that need to strtoupper?

giggsey avatar Nov 29 '21 10:11 giggsey

So far this is the only place i've encountered while porting my code from js to php. Will create PR after finish work

blacklizard avatar Nov 29 '21 10:11 blacklizard

Fixed in #534

giggsey avatar Oct 04 '22 14:10 giggsey