mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 14:09:21 +00:00
Indicate field on validation error
This commit is contained in:
parent
f6e6f7584c
commit
9a56fc4176
1 changed files with 2 additions and 1 deletions
|
|
@ -175,7 +175,8 @@ func (val *v) ValidateResource(res resource.Resource) Result {
|
|||
if msg != "" {
|
||||
msg += " - "
|
||||
}
|
||||
msg += errMsg.Description()
|
||||
details := errMsg.Details()
|
||||
msg += fmt.Sprintf("For field %s: %s", details["field"].(string), errMsg.Description())
|
||||
}
|
||||
|
||||
return Result{Resource: res, Status: Invalid, Err: fmt.Errorf("%s", msg)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue