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

Update validation: phone valid if one country is valid #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shqear93
Copy link

@shqear93 shqear93 commented Aug 24, 2021

validates :attribute, phone: { allow_blank: true, countries: [:us, :ca] }

Phone number should be valid if it's at least valid for one country from the provided list

@daddyz
Copy link
Owner

daddyz commented Aug 26, 2021

@shqear93 nice PR, can you make this behavior optional, maybe via config param? And additionally this behavior doesn't respect possible param, this is required too

@shqear93
Copy link
Author

@daddyz I'll work on that soon

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

Successfully merging this pull request may close these issues.

3 participants