title: Cakephp custom validation for input
body: <p>I have model (List) which have a list of values: 5 10 20 30 40 50</p>
  
  <p>I have a input value where i must to insert a minimal value which is the previous value insert.
  if i insert 7 the next minimal value should be 10. if i insert 11 the next minimal value is 20.</p>
  
  <p>My question is how can validate this input?
  in model i have:</p>
  
  <pre><code>'valor_licitacao' =&gt; array(
          'required' =&gt; array(
              'rule' =&gt; array('comparison', '&gt;=', 20000),
              'message' =&gt; 'The value must be greater then 20000'
          )
      )
  </code></pre>
  
  <p>how can i define a rule that says: "the values should be greater than <code>List-&gt;find('first', 'conditions' =&gt; array('List.valor &gt; '.$mylastvalue)));</code></p>
  
  <p>Thanks in advance, please feel free to ask any question about this.</p>