Skip to content

Commit 72c4503

Browse files
authored
doc(errors): mention RegisterTagNameFunc for FieldError.Field (#1358)
## Fixes Or Enhances fixes #337 **Make sure that you've checked the boxes below before you submit PR:** - [x] Tests exist or have been written that cover this particular change. @go-playground/validator-maintainers
1 parent e96e984 commit 72c4503

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
@@ -114,6 +114,8 @@ type FieldError interface {
114114
// Field returns the fields name with the tag name taking precedence over the
115115
// field's actual name.
116116
//
117+
// `RegisterTagNameFunc` must be registered to get tag value.
118+
//
117119
// eq. JSON name "fname"
118120
// see StructField for comparison
119121
Field() string

0 commit comments

Comments
 (0)