diff --git a/app/Menus/ItemValidator.php b/app/Menus/ItemValidator.php index 027a679..a678b27 100644 --- a/app/Menus/ItemValidator.php +++ b/app/Menus/ItemValidator.php @@ -8,7 +8,7 @@ use Respect\Validation\Exceptions\NestedValidationException; /** * * - * + * * */ class ItemValidator @@ -107,13 +107,16 @@ class ItemValidator $errors = $exception->getMessages(); } + // remove message + $this->remove($menu, $this->message); + + // if errors a set add message if (isset($errors)) { // @TODO use ColorUtil $this->message->setText("\033[33m"."\xE2\x9A\xA0 ".join(' ', $errors)); $this->addAfter($menu, $item, $this->message); - } else { - $this->remove($menu, $this->message); + } } } \ No newline at end of file