Skip to content

Commit bba37c3

Browse files
committed
doc(errors): mention RegisterTagNameFunc for FieldError.Field
fixes go-playground#337
1 parent 6c3307e commit bba37c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

errors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ type FieldError interface {
118118
// Field returns the fields name with the tag name taking precedence over the
119119
// field's actual name.
120120
//
121+
// `RegisterTagNameFunc` must be registered to get tag value.
122+
//
121123
// eq. JSON name "fname"
122124
// see StructField for comparison
123125
Field() string

0 commit comments

Comments
 (0)