[server/validate] respond with all validation errors (#11776)
* [server/validate] respond with all validation errors * [server/config] fail with all validation errors
This commit is contained in:
parent
d23fa3689b
commit
866bf5d520
|
@ -97,7 +97,10 @@ module.exports = class Config {
|
|||
);
|
||||
}
|
||||
|
||||
const results = Joi.validate(newVals, this.getSchema(), { context });
|
||||
const results = Joi.validate(newVals, this.getSchema(), {
|
||||
context,
|
||||
abortEarly: false
|
||||
});
|
||||
|
||||
if (results.error) {
|
||||
throw results.error;
|
||||
|
|
|
@ -21,6 +21,11 @@ export default function (kbnServer, server, config) {
|
|||
cors: config.get('server.cors'),
|
||||
payload: {
|
||||
maxBytes: config.get('server.maxPayloadBytes')
|
||||
},
|
||||
validate: {
|
||||
options: {
|
||||
abortEarly: false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue