title: Rails: Validate with arguments
body: <p>I am using Rails 3.0.3 where I have quite an extensive validation process.</p>
  
  <p>I want to make a validation where I check if a certain variable is a proper date</p>
  
  <p>Basically this is what I want to do is:</p>
  
  <pre><code>def validate_date(this_date)?
  
      begin
         Date.parse(this_date)
      rescue
        proper_date = false
      else
            proper_date = true
      end
  end
  </code></pre>
  
  <p>and call this method in my model using:</p>
  
  <pre><code>attr_accessor :given_date    
  validate_date(given_date)
  </code></pre>
  
  <p>but also at another place in my validation file using for example:</p>
  
  <pre><code>attr_accessor :another_date
  validate_date(another_date)
  </code></pre>
  
  <p>or something similar...</p>
  
  <p>What do I need to do to make this work?</p>