Browse Source

adding #42

master
Björn 4 years ago
parent
commit
5f45a5b02b
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      app/Menus/ItemValidator.php

+ 6
- 3
app/Menus/ItemValidator.php View File

@ -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);
}
}
}

Loading…
Cancel
Save