title: Custom validation method in Rails that receives whole hash of fields
body: <p>I need a custom validation method that receives all set fields. I need this because I dynamically add multiple fields for a <code>has_many :through</code> relation in a form and I need to make sure there aren't any duplicate values entered.</p>
  
  <p>I know that regular Rails validation methods operate on a single field, but I couldn't find anything to handle all fields.</p>