title: Yii validation rule - unique
body: <p>in Yii framework, can I use unique validation rule to check uniqueness of an field within some condition (I know there is criteria, but this condition is a bit tricky)? Ie, i want to check num_days unique by property_id.</p>
  
  <p>table:</p>
  
  <pre><code>NUM PROP_ID
  
  3   4
  
  3   5
  </code></pre>
  
  <p>validation should pass in case i try insert  3, 6, but fail in case of 3, 4</p>