Validation rule: uniquePair

I wonder if there is CActiveRecord validation rule with which i can check for two unique column values.

I understand i can quickly add rule for one column


array('username', 'unique'),

or more columns (which will validate separatly


array('username,email', 'unique'),

But how should i chec for unique pair (two columns)

In database column i have index


..

PRIMARY KEY (`someColumn1`,`someColumn2`)

..

should i write my own validation rule?

nobody? :huh:

Could be that nobody is answering as this topic has already been on the forum… you just need to search…

Here is one similar that I found - http://www.yiiframew…p?/topic/15622-

thanks, i just wanted to know is there already built-in validation for this