yiisoft/yii — pull request #736 by resurtm (2012-05-21 19:23:42+00:00)
Title: Enh #666: CValidator, CModel, ignore particular scenarios

Testing code:
```php
array('scenario1', 'scenario3')),
// ↑ this same as ↓
//array('firstName', 'required', 'skipOn'=>'scenario1, scenario3'),

// scenario1 and scenario2
array('lastName', 'required'),

// scenario2 and scenario3
array('nickName', 'required', 'skipOn'=>'scenario1'),
);
}
}

$testModel1=new TestModel('scenario1');
$testModel1->validate();

$testModel2=new TestModel('scenario2');
$testModel2->validate();

$testModel3=new TestModel('scenario3');
$testModel3->validate();
?>

getErrors()); ?>

getErrors()); ?>

getErrors()); ?>

```

Result:
```
array
(
'lastName' => array
(
0 => 'Last Name cannot be blank.'
)
)

array
(
'firstName' => array
(
0 => 'First Name cannot be blank.'
)
'lastName' => array
(
0 => 'Last Name cannot be blank.'
)
'nickName' => array
(
0 => 'Nick Name cannot be blank.'
)
)

array
(
'lastName' => array
(
0 => 'Last Name cannot be blank.'
)
'nickName' => array
(
0 => 'Nick Name cannot be blank.'
)
)
```