mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-05 15:04:38 +01:00
ExistValidator count logic fix
This commit is contained in:
@@ -93,7 +93,7 @@ class ExistValidator extends Validator
|
||||
$query = $this->createQuery($targetClass, $params);
|
||||
|
||||
if (is_array($object->$attribute)) {
|
||||
if ($query->count() === count($object->$attribute)) {
|
||||
if ($query->count() >= count($object->$attribute)) {
|
||||
return;
|
||||
}
|
||||
} elseif ($query->exists()) {
|
||||
|
||||
Reference in New Issue
Block a user