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

SchemaValidator not returning correct invalid additionalProperties

This commit is contained in:
David Jellesma 2014-02-08 03:56:53 -05:00
parent 246cd09118
commit 5eb8e3f12a

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);
}
}
}
}