Validate all rich objects not only the used ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
75c3737054
commit
695e60228d
1 changed files with 8 additions and 2 deletions
|
@ -71,11 +71,17 @@ class Validator implements IValidator {
|
||||||
foreach ($matches[1] as $parameter) {
|
foreach ($matches[1] as $parameter) {
|
||||||
if (!isset($parameters[$parameter])) {
|
if (!isset($parameters[$parameter])) {
|
||||||
throw new InvalidObjectExeption('Parameter is undefined');
|
throw new InvalidObjectExeption('Parameter is undefined');
|
||||||
} else {
|
|
||||||
$this->validateParameter($parameters[$parameter]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($parameters as $parameter) {
|
||||||
|
if (!\is_array($parameter)) {
|
||||||
|
throw new InvalidObjectExeption('Parameter is malformed');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->validateParameter($parameter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue