diff --git a/framework/validators/ExistValidator.php b/framework/validators/ExistValidator.php index 4a88e675e8..777231f08b 100644 --- a/framework/validators/ExistValidator.php +++ b/framework/validators/ExistValidator.php @@ -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()) {