just some nicer error reporting for settings validator
This commit is contained in:
parent
74cb20b8fa
commit
6eda039013
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ class SettingsValidator extends AbstractValidator {
|
|||
$config = &$this->validations[$name];
|
||||
foreach($config as $validatorConfig) {
|
||||
$validator = $this->validatorResolver->createValidator($validatorConfig['validator'], $validatorConfig['options']);
|
||||
if (!$validator) {
|
||||
throw new \Exception('Validator could not be resolved: ' . $validatorConfig['validator'] . '. Check your validation.yaml', 1402326139);
|
||||
}
|
||||
if (isset($validatorConfig['property'])) {
|
||||
$this->result->forProperty($validatorConfig['property'])->merge($validator->validate(ObjectAccess::getPropertyPath($value, $validatorConfig['property'])));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue