diff --git a/src/SAREhub/Microt/App/Request/ValidationDefinitionHelper.php b/src/SAREhub/Microt/App/Request/ValidationDefinitionHelper.php index 6f009f1..e87cc6a 100644 --- a/src/SAREhub/Microt/App/Request/ValidationDefinitionHelper.php +++ b/src/SAREhub/Microt/App/Request/ValidationDefinitionHelper.php @@ -58,8 +58,8 @@ public static function parsedBody($validator) private static function validatorDef($validator) { if ($validator instanceof Validatable) { - return factory(function (Validatable $validator) { - return $validator; + return factory(function (ValidatorWrapper $wrapper) { + return $wrapper->getValidator(); })->parameter(0, value(ValidatorWrapper::create($validator))); }