You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: When one of the affected area codes is used to populate a phone number and user backspaces to remove digits, if the backspace would cause phone number length to be 7 digits, regex pattern causes the "national format" to output with the area code duplicated.
The metadata regex patterns for the affected countries may be at fault. Their country code is actually +1 (North America) and the "area code" is the following 3 digits. Regex pattern should probably use pattern length of 10 for these to allow for the "area code" to be part of the full phone number (similar to Canada, US, Dominican Republic etc). Our findings show the regex has length of 7. Making the adjustment manually in the metadata file did stop this from happening.
Issue: When one of the affected area codes is used to populate a phone number and user backspaces to remove digits, if the backspace would cause phone number length to be 7 digits, regex pattern causes the "national format" to output with the area code duplicated.
The metadata regex patterns for the affected countries may be at fault. Their country code is actually +1 (North America) and the "area code" is the following 3 digits. Regex pattern should probably use pattern length of 10 for these to allow for the "area code" to be part of the full phone number (similar to Canada, US, Dominican Republic etc). Our findings show the regex has length of 7. Making the adjustment manually in the metadata file did stop this from happening.
Here's an example for American Samoa using appspot
https://libphonenumber.appspot.com/phonenumberparser?number=6845551&country=AS
The metadata file has this entry for American Samoa:
"AS":["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"]
The regex pattern we tested changing was
([267]\\d{6})$|1
which we changed to([267]\\d{9})$|1
and the problem did not occur againFull list of affected dialing codes / countries:
The text was updated successfully, but these errors were encountered: