Update dependencies

This commit is contained in:
Ingo Oppermann
2024-02-29 14:50:38 +01:00
parent 32a7916359
commit e8ca91d214
222 changed files with 14005 additions and 4625 deletions

View File

@@ -1,4 +1,4 @@
GOCMD=GO111MODULE=on go
GOCMD=go
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \

View File

@@ -1,7 +1,7 @@
Package validator
=================
<img align="right" src="logo.png">[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Project status](https://img.shields.io/badge/version-10.16.0-green.svg)
![Project status](https://img.shields.io/badge/version-10.18.0-green.svg)
[![Build Status](https://travis-ci.org/go-playground/validator.svg?branch=master)](https://travis-ci.org/go-playground/validator)
[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator)

View File

@@ -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)