How to validate the uniqueness of multiple columns

Comparing #9 with #10

Revision #10 was created by oligalma oligalma on Sep 26, 2015, 9:41:12 PM.

I added "the combination of" before "which need to be unique"

Content

I am going to show you an effective way to validate the uniqueness of multiple columns. In the following example we have 3 columns, the combination of which need to be unique: id, category and language.


```php
class Post extends CActiveRecord
{
[...]