Browse Source

fixes #995

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
6f9785a293
  1. 6
      framework/yii/base/Model.php
  2. 2
      framework/yii/data/ActiveDataProvider.php

6
framework/yii/base/Model.php

@ -117,7 +117,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* ~~~ * ~~~
* *
* In the above `$attribute` refers to currently validated attribute name while `$params` contains an array of * In the above `$attribute` refers to currently validated attribute name while `$params` contains an array of
* validator configuration options such as `max` in case of `length` validator. Currently validate attribute value * validator configuration options such as `max` in case of `string` validator. Currently validate attribute value
* can be accessed as `$this->[$attribute]`. * can be accessed as `$this->[$attribute]`.
* *
* Yii also provides a set of [[Validator::builtInValidators|built-in validators]]. * Yii also provides a set of [[Validator::builtInValidators|built-in validators]].
@ -129,8 +129,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* array( * array(
* // built-in "required" validator * // built-in "required" validator
* array('username', 'required'), * array('username', 'required'),
* // built-in "length" validator customized with "min" and "max" properties * // built-in "string" validator customized with "min" and "max" properties
* array('username', 'length', 'min' => 3, 'max' => 12), * array('username', 'string', 'min' => 3, 'max' => 12),
* // built-in "compare" validator that is used in "register" scenario only * // built-in "compare" validator that is used in "register" scenario only
* array('password', 'compare', 'compareAttribute' => 'password2', 'on' => 'register'), * array('password', 'compare', 'compareAttribute' => 'password2', 'on' => 'register'),
* // an inline validator defined via the "authenticate()" method in the model class * // an inline validator defined via the "authenticate()" method in the model class

2
framework/yii/data/ActiveDataProvider.php

@ -77,7 +77,7 @@ class ActiveDataProvider extends BaseDataProvider
public $db; public $db;
/** /**
* Initializes the DbCache component. * Initializes the DB connection component.
* This method will initialize the [[db]] property to make sure it refers to a valid DB connection. * This method will initialize the [[db]] property to make sure it refers to a valid DB connection.
* @throws InvalidConfigException if [[db]] is invalid. * @throws InvalidConfigException if [[db]] is invalid.
*/ */

Loading…
Cancel
Save