title: Separating the model validations?
body: <p>So I have an app with a backend admin dashboard that allows admins to upload Slider images for the rotating carousel. There's a rotating carousel on the index page (when signed in) and the landing page when (when signed out).</p>
  
  <p>The issue is both of the landing page and index image uploads share the same dimension validation, however, I'd like to have a different size for the Landing Page then the Index page. I'd like to somehow allow this by either separating the fields or by some other efficient means.</p>
  
  <p>Any ideas? Please see current code below:</p>
  
  <pre><code>class Slider &lt; ActiveRecord::Base
    validates :short_text, presence: true
  
    has_attached_file :image, styles: {
        medium: '800x&gt;',
        small: '300x&gt;'
    }
  
    validates_attachment_content_type :image, :content_type =&gt; /\Aimage\/.*\Z/
    validates :image, dimensions: { width: 1024, height: 427 }, on: :create
  
    SLIDER_TYPES = {
      0 =&gt; "Both (Landing and Index page)",
      1 =&gt; "Landing Page",
      2 =&gt; 'Index Page'
    }
  end
  </code></pre>