Skip to content

Commit

Permalink
#updated Added required_id spanish translation (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBet7o authored Jan 30, 2023
1 parent 3201fe4 commit 7edc63a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions translations/es/es.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions translations/es/es_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 7edc63a

Please sign in to comment.