diff --git a/errors.go b/errors.go index e4e9814..147d2ac 100644 --- a/errors.go +++ b/errors.go @@ -323,7 +323,6 @@ func newError(err ResultError, context *JsonContext, value interface{}, locale l details["context"] = context.String() } - err.SetDescription(formatErrorDescription(err.DescriptionFormat(), details)) } // formatErrorDescription takes a string in the default text/template diff --git a/result.go b/result.go index 0a01791..81a5e9c 100644 --- a/result.go +++ b/result.go @@ -188,6 +188,9 @@ func (v *Result) Valid() bool { // Errors returns the errors that were found func (v *Result) Errors() []ResultError { + for _, err := range v.errors { + err.SetDescription(formatErrorDescription(err.DescriptionFormat(), err.Details())) + } return v.errors }