title: How to write validation in cakephp php model part
body: <p>There is a table location containing <code>city</code> and <code>name</code> columns. 
  Query is:</p>
  
  <pre><code>$count=$this-&gt;Location-&gt;find("all",array("conditions" =&gt; array("Location.city" =&gt; '$city',"Location.area" =&gt; '$location')));
  </code></pre>
  
  <p>If condition becomes true, it has to show an error message.</p>
  
  <p>In Model
   <code>role=&gt;"unique"</code>
  option is there, but it is for only one column.
  But in above query its depends on two columns. How to write validation for this?</p>