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.
table:
NUM PROP_ID
3 4
3 5
validation should pass in case i try insert 3, 6, but fail in case of 3, 4