Skip to content

Commit

Permalink
Fixes yiisoft#1310 Improved API docs for CModel::rules and CModel::ge…
Browse files Browse the repository at this point in the history
…tScenario
  • Loading branch information
samdark committed Sep 8, 2012
1 parent 7b73df5 commit b882048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions framework/base/CModel.php
Expand Up @@ -61,7 +61,9 @@ abstract public function attributeNames();
* And a validator class is a class extending {@link CValidator}.</li>
* <li>on: this specifies the scenarios when the validation rule should be performed.
* Separate different scenarios with commas. If this option is not set, the rule
* will be applied in any scenario. Please see {@link scenario} for more details about this option.</li>
* will be applied in any scenario that is not listed in "except". Please see {@link scenario} for more details about this option.</li>
* <li>except: this specifies the scenarios when the validation rule should not be performed.
* Separate different scenarios with commas. Please see {@link scenario} for more details about this option.</li>
* <li>additional parameters are used to initialize the corresponding validator properties.
* Please refer to individal validator class API for possible properties.</li>
* </ul>
Expand Down Expand Up @@ -508,7 +510,8 @@ public function onUnsafeAttribute($name,$value)
* be massively assigned.
*
* A validation rule will be performed when calling {@link validate()}
* if its 'on' option is not set or contains the current scenario value.
* if its 'except' value does not contain current scenario value while
* 'on' option is not set or contains the current scenario value.
*
* And an attribute can be massively assigned if it is associated with
* a validation rule for the current scenario. Note that an exception is
Expand Down

0 comments on commit b882048

Please sign in to comment.