-
Notifications
You must be signed in to change notification settings - Fork 62
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
Doesn't handle short codes properly #69
Comments
My first question here is: Should the It seems like a significant portion of this library leans on having a country code. However, in terms of dialing, they don't appear to be used. So, I'm not sure what the right choice is here. |
Ah, we don't have to define this, do we? Apparently there is a short code standard defined alongside https://github.com/google/libphonenumber/blob/master/resources/ShortNumberMetadata.xml |
I was initially looking at creating new metadata for this, but the more I look, there is a pretty standard format, and we can probably just lean on the |
I took a stab at this by fetching the |
I made a PR for this. Its in no way complete or clean. I wanted to share what I've done so far for feedback. This is a bit of a yak shave for me so I implemented short code validation before creating phone numbers. Ya'll let me know what you think. |
This library doesn't appear to handle short codes properly.
Check this case:
That is a valid shortcode, from which I received a confirmation code.
I'd be willing to take this on. A little guidance on where to read the code to port from in libphonenumber, and where it should go in ex_phone_number would be super helpful.
The text was updated successfully, but these errors were encountered: