iziz / libPhoneNumber-iOS

iOS port from libphonenumber (Google's phone number handling library)
Apache License 2.0
2.35k stars 459 forks source link

Update phone number metadata and add documentation #380

Closed blindmonkey closed 1 year ago

blindmonkey commented 1 year ago

We use this library in our app and a little while ago we noticed that some phone numbers weren't validating properly. Specifically, US phone numbers in the format (582) 203-XXXX (e.g. (582) 203-1111) weren't passing validation despite being valid.

It wasn't really clear to us how the metadata was generated, since the README didn't include that information, and when we ran the scripts we saw JS errors (specifically Javascript exception thrown: ReferenceError: Can't find variable: window), which was caused by the loading of jQuery, which seems to be unused in the script. It turns out that the script completed successfully even with that error, and also without loading jQuery, so this PR removes that.

Additionally, this PR adds documentation for updating the metadata and updates the metadata in hopes that this is useful to others.

paween commented 1 year ago

We've just updated the metadata. I'd like to have your documentation, so if you can create a PR that only includes the documentation, I can merge it.