title: Ruby on Rails - Activeadmin, different validation with the same model
body: <p>I did register the same Model twice with activeadmin :</p>
  
  <pre><code>ActiveAdmin.register Media, as: 'Picture' do
  end
  ActiveAdmin.register Media, as: 'Video' do
  end
  </code></pre>
  
  <p>But I want to have a different validation based on the type. I want this for the video:<BR/>models/video.rb</p>
  
  <pre><code>validate :validate_video_count
  def validate_video_count
      errors.add(:error, "Require minimum 1 video") if self.videos.size &lt; 1
  end
  </code></pre>
  
  <p>And this for the picture :<BR/>models/picture.rb</p>
  
  <pre><code>validate :validate_picture_count
  def validate_picture_count
      errors.add(:error, "Require minimum 1 picture") if self.pictures.size &lt; 1
  end
  </code></pre>