Skip to content
This repository

Identifying an unsupported country #57

vladgurovich opened this Issue August 23, 2012 · 4 comments

2 participants

Vladimir Gurovich Florian R. Hanke
Vladimir Gurovich

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?

Florian R. Hanke

Have you tried it using the Phony based validations?

Vladimir Gurovich

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.

Florian R. Hanke

Hi Vladimir,

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


Florian R. Hanke

Closing this since I never got an answer.

Florian R. Hanke floere closed this October 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.