Commit ccaa052d by Alexander Kochetov

ExistValidator count logic fix

parent 087b7ca9
......@@ -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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment