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

Plausible approves many invalid USA numbers #197

Open
fluffyx opened this issue Jul 24, 2019 · 1 comment
Open

Plausible approves many invalid USA numbers #197

fluffyx opened this issue Jul 24, 2019 · 1 comment

Comments

@fluffyx
Copy link

fluffyx commented Jul 24, 2019

plausible_number? returns true for these, but they are invalid:

+1 (?11) ???-????
+1 (???) ?11-????
+1 (???) 1??-????
+1 (???) 0??-????

Same for this set of 555 numbers. Every one of these is reserved for "example" phone numbers, to be used in movies, for instance. They will never be a working number.

+1 (???) 555-01??
+1 (800) 555-????
+1 (822) 555-????
+1 (833) 555-????
+1 (844) 555-????
+1 (855) 555-????
+1 (866) 555-????
+1 (877) 555-????
+1 (888) 555-????
+1 (555) ???-????

Numbers matching the following pattern are usually fake because movies tend to stray outside of the officially reserved +1 (???) 555-01?? zone, but I read that some areas which have run out of other numbers have begun to use them. I've never seen it in real life.

+1 (???) 555-????

The following number is for directory assistance. It will never be a real user's phone number.

+1 (???) 555-1212

You may find that the last two examples are outside of the scope of phony_rails and should be handled by the application. But all other examples should return false when calling plausible_number?.

Thank you for your consideration!

@joost
Copy link
Owner

joost commented Jul 25, 2019

Hi, please check if this is a phony gem issue.
If not please create the test cases and a merge request.

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