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

support for arrays in postgres #59

Closed
holden opened this issue Jul 25, 2014 · 1 comment
Closed

support for arrays in postgres #59

holden opened this issue Jul 25, 2014 · 1 comment

Comments

@holden
Copy link

holden commented Jul 25, 2014

We store emails & phone numbers in arrays rather than in simple fields and use something like this to validate the array's attributes.

https://gist.github.com/ssimeonov/6519423

Which I'm attempting to use like so:

validates :phones, enum: { phony_plausible: true }

This works for other kinds of attributes but I can't get it to work with your gem.

I get the error

element 0 (7534721234) is an invalid number

However if I try 447534721234 it works fine.

I also double check that it worked on a single column and it worked fine. Any idea how I could fix this?

Thanks,

@joost
Copy link
Owner

joost commented Jan 21, 2015

Guess it is an invalid number? :)

@joost joost closed this as completed Jan 21, 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