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

Allow validating against multiple countries #81

Closed
a14m opened this issue Mar 9, 2015 · 2 comments
Closed

Allow validating against multiple countries #81

a14m opened this issue Mar 9, 2015 · 2 comments

Comments

@a14m
Copy link

a14m commented Mar 9, 2015

currently I can't figure out if it's possible to validate the country_code of a phone_number to be one of multiple country codes...

for example I was thinking

  # assume that by default the number is from US but allow numbers also from GB
  validates_plausible_phone :phone_number, country_code: ["GB", "US"]
  phony_normalize :phone_number, default_country_code: 'US'

so that I could validate if the number is a valid number in either the US or GB
but I'm not sure if that is possible under the current implementation or not

@joost
Copy link
Owner

joost commented Mar 10, 2015

Currently not possible. Pull request welcome!

@a14m
Copy link
Author

a14m commented Mar 10, 2015

Will try to do it in my free time

@a14m a14m closed this as completed Mar 10, 2015
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