From 6eda039013bb88f8a8787a078b916a081b30dd40 Mon Sep 17 00:00:00 2001 From: Ferdinand Kuhl Date: Tue, 19 Aug 2014 00:16:02 +0200 Subject: [PATCH] just some nicer error reporting for settings validator --- .../Validation/Validator/SettingsValidator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/DigiComp/SettingValidator/Validation/Validator/SettingsValidator.php b/Classes/DigiComp/SettingValidator/Validation/Validator/SettingsValidator.php index dd23fb5..5fe9d23 100644 --- a/Classes/DigiComp/SettingValidator/Validation/Validator/SettingsValidator.php +++ b/Classes/DigiComp/SettingValidator/Validation/Validator/SettingsValidator.php @@ -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 {