diff --git a/Classes/Validation/Validator/SettingsValidator.php b/Classes/Validation/Validator/SettingsValidator.php index 9ba1929..3752ed7 100644 --- a/Classes/Validation/Validator/SettingsValidator.php +++ b/Classes/Validation/Validator/SettingsValidator.php @@ -133,6 +133,7 @@ class SettingsValidator extends AbstractValidator if (is_null($validation)) { continue; } + $this->extractValidationGroupsFromOptions($newValidation); $newValidation['options'] = $validation; $newValidation['validator'] = $validator; $config[] = $newValidation; @@ -144,6 +145,7 @@ class SettingsValidator extends AbstractValidator if (is_null($options)) { continue; } + $this->extractValidationGroupsFromOptions($options); $newValidation['property'] = $propertyName; $newValidation['validator'] = $validator; $newValidation['options'] = $options; @@ -182,4 +184,15 @@ class SettingsValidator extends AbstractValidator $validatorConfig['options']['validationGroups'] = $this->options['validationGroups']; } } + + /** + * @param $newValidation + */ + protected function extractValidationGroupsFromOptions(&$newValidation) + { + if (isset($newValidation['options']['validationGroups'])) { + $newValidation['validationGroups'] = $newValidation['options']['validationGroups']; + unset($newValidation['options']['validationGroups']); + } + } }