On Tuesday, April 23, 2013 1:47:10 PM UTC-7, Jeremy Evans wrote:
>
> On Tuesday, April 23, 2013 1:03:10 PM UTC-7, Jamie Hodge wrote:
>>
>> What is the syntax for constraining the format of a pg_array element?
>
>
> No built in validations handle it. You could probably do:
>
> # assuming an int8[] column
> errors.add(:array_col, "not valid") unless
> array_col.is_a?(Sequel::Postgres::PGArray) && array_col.all?{|v|
> v.is_a?(Integer)}
>
> If I've misunderstood the question, please be more specific. :)
>
Apparently I didn't pay attention to the subject. Specifically,
constraint_validations does not handle it, since it only mirrors the
validations offered by validation_helpers.
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.