phony_rails icon indicating copy to clipboard operation
phony_rails copied to clipboard

Plausible approves many invalid USA numbers

Open fluffyx opened this issue 5 years ago • 1 comments

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!

fluffyx avatar Jul 24 '19 21:07 fluffyx

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

joost avatar Jul 25 '19 17:07 joost