Fill in localized field for bad numbers, when prefix is okay #2
Labels
No labels
bug
dependencies
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
andyburke/phoneparser#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am using phoneparser as way for preparing phone numbers for presenting in a form (vue based app), where the country code and local phone number components are in separate fields.
In certain case the national component entered by the user will be invalid, even if the dialing code is valid. When the local number component is invalid, phoneparser won't fill in the localized field.
Some cases:
I get the following results:
The first and third look to be the same to me. The second one looks like a valid US/Canada number, and for me the localized portion seems to be correct.
The first and third examples are strange, can you give me some more info? Are they meant to be US numbers? If so, they're missing a digit. Are they meant to be numbers somewhere else but have +1 on the front?
They are all meant to be US/Canada numbers, but with only the first one being correct. The expectation is that they should all be identified as US/Canada numbers, based on prefix, even if they aren't valid based on length
Please see the 3.0.0 release phoneparser that uses the updated countrdata 3.0.0 release. I made some (I hope) improvements to the number matching that should hopefully address this.
For me, the first and third are still Bangladesh (since the lengths don't seem right for USA/CAN) but the middle example now resolves to CAN.
@ajmas please let me know if this is still an issue and I will reopen, but for now I am going to close.