From e24efcac8b67baa9454bf27631e5e49f898a88d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:12:06 +0000 Subject: [chore]: Bump github.com/gin-contrib/cors from 1.5.0 to 1.7.0 (#2745) --- vendor/github.com/go-playground/validator/v10/errors.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/go-playground/validator/v10/errors.go') diff --git a/vendor/github.com/go-playground/validator/v10/errors.go b/vendor/github.com/go-playground/validator/v10/errors.go index 5856d57c8..be2676e9e 100644 --- a/vendor/github.com/go-playground/validator/v10/errors.go +++ b/vendor/github.com/go-playground/validator/v10/errors.go @@ -257,15 +257,19 @@ func (fe *fieldError) Error() string { // NOTE: if no registered translation can be found, it returns the original // untranslated error message. func (fe *fieldError) Translate(ut ut.Translator) string { + var fn TranslationFunc m, ok := fe.v.transTagFunc[ut] if !ok { return fe.Error() } - fn, ok := m[fe.tag] + fn, ok = m[fe.tag] if !ok { - return fe.Error() + fn, ok = m[fe.actualTag] + if !ok { + return fe.Error() + } } return fn(ut, fe) -- cgit v1.2.3