Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/github.com/google/uu…
Browse files Browse the repository at this point in the history
…id-1.1.5
  • Loading branch information
jpwhitemn authored Jan 19, 2021
2 parents 76c00e2 + c0e791c commit c0ce44a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v2/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func Validate(a interface{}) error {
// Internal: generate representative validation error messages
func getErrorMessage(e validator.FieldError) string {
tag := e.Tag()
fieldName := e.Field()
// StructNamespace returns the namespace for the field error, with the field's actual name.
fieldName := e.StructNamespace()
fieldValue := e.Param()
var msg string
switch tag {
Expand Down

0 comments on commit c0ce44a

Please sign in to comment.