From bba37c3ac9340877fbecec6c7eb89de2ad500239 Mon Sep 17 00:00:00 2001 From: Ajamal Khan <13559558+khan-ajamal@users.noreply.github.com> Date: Mon, 6 Jan 2025 07:03:40 +0530 Subject: [PATCH] doc(errors): mention RegisterTagNameFunc for FieldError.Field fixes https://github.com/go-playground/validator/issues/337 --- errors.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/errors.go b/errors.go index be2676e9e..357a02a3b 100644 --- a/errors.go +++ b/errors.go @@ -118,6 +118,8 @@ type FieldError interface { // Field returns the fields name with the tag name taking precedence over the // field's actual name. // + // `RegisterTagNameFunc` must be registered to get tag value. + // // eq. JSON name "fname" // see StructField for comparison Field() string