mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Fixed test break
This commit is contained in:
@ -111,7 +111,7 @@ class ExistValidator extends Validator
|
|||||||
$query = $this->createQuery($targetClass, $params);
|
$query = $this->createQuery($targetClass, $params);
|
||||||
|
|
||||||
if (is_array($model->$attribute)) {
|
if (is_array($model->$attribute)) {
|
||||||
if ($query->count("DISTINCT [[$targetAttribute]]") !== count($model->$attribute)) {
|
if ($query->count("DISTINCT [[$targetAttribute]]") != count($model->$attribute)) {
|
||||||
$this->addError($model, $attribute, $this->message);
|
$this->addError($model, $attribute, $this->message);
|
||||||
}
|
}
|
||||||
} elseif (!$query->exists()) {
|
} elseif (!$query->exists()) {
|
||||||
|
Reference in New Issue
Block a user