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

Some German numbers not passing plausible_numbers? without country_code #193

Closed
goalaleo opened this issue May 28, 2019 · 3 comments
Closed

Comments

@goalaleo
Copy link

I generated some German numbers with the FFaker gem, and some generated numbers fail the PhonyRails.plausible_number? check if the country_code: option is omitted, but pass it when it is provided:

> fails_without_country_code_but_passes_with_it = proc { |number| !PhonyRails.plausible_number?(number) && PhonyRails.plausible_number?(number, country_code: "DE") }

> numbers = 100.times.map { FFaker::PhoneNumberDE.international_mobile_phone_number }

> numbers.select &fails_without_country_code_but_passes_with_it
=> ["+49 152 7513282", "+49 152 1043799", "+49 152 2883145"]
@joost
Copy link
Owner

joost commented May 28, 2019

Hmm.. can you verify if it is a phony or phony_rails issue?

@goalaleo
Copy link
Author

goalaleo commented May 29, 2019

@joost it seems to be a phony issue after all. I'll open an issue there 👍

> numbers.select{ |n| !Phony.plausible?(n) }
=> ["+49 152 7513282", "+49 152 1043799", "+49 152 2883145"]

floere/phony#440

@joost
Copy link
Owner

joost commented May 29, 2019

👍 closing

@joost joost closed this as completed May 29, 2019
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