From 7edc63a0be364f8a8796cc9c81cf455dcc8f2b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Ram=C3=ADrez?= Date: Sun, 29 Jan 2023 22:33:51 -0600 Subject: [PATCH] #updated Added required_id spanish translation (#1026) --- translations/es/es.go | 5 +++++ translations/es/es_test.go | 1 + 2 files changed, 6 insertions(+) diff --git a/translations/es/es.go b/translations/es/es.go index 263540856..73b06cfab 100644 --- a/translations/es/es.go +++ b/translations/es/es.go @@ -29,6 +29,11 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er translation: "{0} es un campo requerido", override: false, }, + { + tag: "required_if", + translation: "{0} es un campo requerido", + override: false, + }, { tag: "len", customRegisFunc: func(ut ut.Translator) (err error) { diff --git a/translations/es/es_test.go b/translations/es/es_test.go index 814f2ab6a..c2c4c81a3 100644 --- a/translations/es/es_test.go +++ b/translations/es/es_test.go @@ -35,6 +35,7 @@ func TestTranslations(t *testing.T) { RequiredString string `validate:"required"` RequiredNumber int `validate:"required"` RequiredMultiple []string `validate:"required"` + RequiredIf string `validate:"required_if=Inner.RequiredIf abcd"` LenString string `validate:"len=1"` LenNumber float64 `validate:"len=1113.00"` LenMultiple []string `validate:"len=7"`