Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions result.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down