Skip to content
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

New Mexican phones falling validation #150

Closed
CaioCSdev opened this issue Feb 8, 2019 · 1 comment
Closed

New Mexican phones falling validation #150

CaioCSdev opened this issue Feb 8, 2019 · 1 comment

Comments

@CaioCSdev
Copy link
Contributor

Hi,

Recently Mexico has added the 56 local code, so phone numbers like this: "5610678471" are valid, but the gem validation fails:

[1] pry(main)> require 'phonelib'
=> true
[2] pry(main)> Phonelib.valid_for_country? "5610678471", "MX"
=> false
[3] pry(main)> Phonelib.valid? "+525610678471"
=> false

Google libphonenumber has recently updated their data files google/libphonenumber@ea6d594, so I believe that updating the gem's one might fix the issue.

To summarize, two questions:

  1. Please could the data file be updated?
  2. How to update the data file? The README shows how to override the phone_data, but I just want to add a new entry. How can I use the data files from libphonenumber to generate a new phone_data for the gem?

Perhaps that was more then two questios 😁

Thanks!

@daddyz
Copy link
Owner

daddyz commented Feb 10, 2019

@eliada Hi, I updated the gem's data, usually I am updating the data once in a month and publishing new version. You can just update the gem to v0.6.29.
Anyway there is a rake task that updates in case you want to use gem from your own repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants