From 6f9785a2937144744ae5f3466b0d1167b6bb995e Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 17 Oct 2013 12:30:41 +0400 Subject: [PATCH] fixes #995 --- framework/yii/base/Model.php | 6 +++--- framework/yii/data/ActiveDataProvider.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/yii/base/Model.php b/framework/yii/base/Model.php index c8c253a..7fb8c35 100644 --- a/framework/yii/base/Model.php +++ b/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 - * 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]`. * * Yii also provides a set of [[Validator::builtInValidators|built-in validators]]. @@ -129,8 +129,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess * array( * // built-in "required" validator * array('username', 'required'), - * // built-in "length" validator customized with "min" and "max" properties - * array('username', 'length', 'min' => 3, 'max' => 12), + * // built-in "string" validator customized with "min" and "max" properties + * array('username', 'string', 'min' => 3, 'max' => 12), * // built-in "compare" validator that is used in "register" scenario only * array('password', 'compare', 'compareAttribute' => 'password2', 'on' => 'register'), * // an inline validator defined via the "authenticate()" method in the model class diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index c5f1bcd..bd822f9 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/framework/yii/data/ActiveDataProvider.php @@ -77,7 +77,7 @@ class ActiveDataProvider extends BaseDataProvider 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. * @throws InvalidConfigException if [[db]] is invalid. */