fix(spec): validation errors formatting (#9687)
Co-authored-by: Enrico Bottacin <enrico.bottacin@gmail.com> Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
This commit is contained in:
@@ -496,11 +496,12 @@ export const validationErrors = (state, pathMethod) => {
|
||||
|
||||
paramValues.forEach( (p) => {
|
||||
let errors = p.get("errors")
|
||||
if ( errors && errors.count() ) {
|
||||
errors.forEach( e => result.push(e))
|
||||
if (errors && errors.count()) {
|
||||
errors
|
||||
.map((e) => (Map.isMap(e) ? `${e.get("propKey")}: ${e.get("error")}` : e))
|
||||
.forEach((e) => result.push(e))
|
||||
}
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user