title: How do I use a model validation to ensure one field is >= another field in the same model in CakePHP?
body: <p>I am trying to validate my model, I am using CakePHP 1.2.3.8166 and mysql 5</p>
  
  <p>I have my model definied as it:</p>
  
  <pre><code>&lt;?php
  class Actividad extends AppModel {
      var $name = 'Actividad';
      var $validate = array('maxfield' =&gt; array(
          'rule'=&gt; array('chkValue'),
          'message'=&gt;'i2'
      ));
  
      function chkValue($data){
          return $data["maxfield"]&gt;=$data["minfield"]
      }
  }
  </code></pre>
  
  <p>My table has 2 fields; <code>maxfield</code> &amp; <code>minfield</code>. I need to validate <code>maxfield</code> always >= <code>minfield</code> but I can't figure out how to check <code>minfield</code> value.</p>