Validation relative to other attributes

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

In a custom validate method.

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


– Tom M.