Identifying an unsupported country #57

vladgurovich opened this Issue Aug 23, 2012 · 4 comments


None yet
2 participants

Is it possible to identify unsupported countries, so that I could use Phony-based validations for those that are supported and fall back to some basic validations for those that are not?


floere commented Aug 24, 2012

Have you tried it using the Phony based validations?

I have and the problem is not with Phony validation per se, but with the fact that not all countries have matchers implemented for them.
For instance, a Philipine phone number is not plausible due to the fact that its matchers are not yet implemented:

Loading development environment (Rails 3.1.6)
[1] pry(main)> Phony.plausible? "6327332350"
=> false
[2] pry(main)> 

What i'd like to have is an ability to fallback to simple validations(i.e. whether a phone number string is in fact mostly numeric) for those countries where matchers are not yet written. Unfortunately I wasnt able to figure out how to get a list of countries with "default" or "todo" matcher programmatically.


floere commented Aug 30, 2012

Hi Vladimir,

Thanks a lot for the clarification!
Can you please try Phony 1.8.0 and tell me if it's satisfactory?



floere commented Oct 25, 2012

Closing this since I never got an answer.

@floere floere closed this Oct 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment