title: accepts_nested_attribute minimum
body: <p>How can I enforce a min number of nested attributes or associated records during creation of the Model.
  This works fine but the error message is shown at the top of the form (nested), I want it to appear inline or near the nested association fields.</p>
  
  <pre><code>Model Vote
  
  has_many :vote_items, :dependent =&gt; :destroy
  
  validate :min_vote_items, :if =&gt; :its_new?
      accepts_nested_attributes_for :vote_items, :limit =&gt; 5, :allow_destroy =&gt; true, :reject_if =&gt; proc { |attrs| attrs[:option].blank? }
  
  
    def min_vote_items
          if self.vote_items.length &lt; 2
              errors.add_to_base("Please specify at least two vote options")
              return false
          end
      end
  </code></pre>