Commit 8188cc78 by Alexander Kochetov

Refactoring

parent 3eb257c3
...@@ -96,10 +96,8 @@ class ExistValidator extends Validator ...@@ -96,10 +96,8 @@ class ExistValidator extends Validator
if ($query->count() !== count($object->$attribute)) { if ($query->count() !== count($object->$attribute)) {
$this->addError($object, $attribute, $this->message); $this->addError($object, $attribute, $this->message);
} }
} else { } elseif (!$query->exists()) {
if (!$query->exists()) { $this->addError($object, $attribute, $this->message);
$this->addError($object, $attribute, $this->message);
}
} }
} }
......
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