From da78b6e16e2775913bcc69138815d32735d12792 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 26 Dec 2013 00:29:03 -0500 Subject: [PATCH] doc fix. --- framework/yii/validators/ExistValidator.php | 2 +- framework/yii/validators/UniqueValidator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/yii/validators/ExistValidator.php b/framework/yii/validators/ExistValidator.php index 7e783a8..caefc49 100644 --- a/framework/yii/validators/ExistValidator.php +++ b/framework/yii/validators/ExistValidator.php @@ -27,7 +27,7 @@ use yii\base\InvalidConfigException; * // a1 needs to exist, but its value will use a2 to check for the existence * ['a1', 'exist', 'targetAttribute' => 'a2'] * // a1 and a2 need to exist together, and they both will receive error message - * ['a1, a2', 'exist', 'targetAttribute' => ['a1', 'a2']] + * [['a1', 'a2'], 'exist', 'targetAttribute' => ['a1', 'a2']] * // a1 and a2 need to exist together, only a1 will receive error message * ['a1', 'exist', 'targetAttribute' => ['a1', 'a2']] * // a1 needs to exist by checking the existence of both a2 and a3 (using a1 value) diff --git a/framework/yii/validators/UniqueValidator.php b/framework/yii/validators/UniqueValidator.php index 1136f02..51474b0 100644 --- a/framework/yii/validators/UniqueValidator.php +++ b/framework/yii/validators/UniqueValidator.php @@ -24,7 +24,7 @@ use yii\db\ActiveRecordInterface; * // a1 needs to be unique, but column a2 will be used to check the uniqueness of the a1 value * ['a1', 'unique', 'targetAttribute' => 'a2'] * // a1 and a2 need to unique together, and they both will receive error message - * ['a1, a2', 'unique', 'targetAttribute' => ['a1', 'a2']] + * [['a1', 'a2'], 'unique', 'targetAttribute' => ['a1', 'a2']] * // a1 and a2 need to unique together, only a1 will receive error message * ['a1', 'unique', 'targetAttribute' => ['a1', 'a2']] * // a1 needs to be unique by checking the uniqueness of both a2 and a3 (using a1 value)