1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-25 10:33:18 +01:00

Merge pull request #555 from dsjellz/master

SchemaValidator not returning correct invalid additionalProperties
This commit is contained in:
Michael Dowling 2014-02-08 13:27:06 -08:00
commit 82c2bf8c30

View File

@ -157,8 +157,9 @@ class SchemaValidator implements ValidatorInterface
}
} else {
// if additionalProperties is set to false and there are additionalProperties in the values, then fail
$keys = array_keys($value);
$this->errors[] = sprintf('%s[%s] is not an allowed property', $path, reset($keys));
foreach ($diff as $prop) {
$this->errors[] = sprintf('%s[%s] is not an allowed property', $path, $prop);
}
}
}
}