Validation relative to other attributes


#1

I have an object O with two ‘collections’. The minimum size for B is
A.length

Also, B has to be a proper subset of A.

What is the correct way to validate B?

David


#2

In a custom validate method.

http://rails.rubyonrails.com/classes/ActiveRecord/
Validations.html#M000671


– Tom M.