Skip to content

Commit 37a1071

Browse files
authored
Add translation of requiredXXX and excludedXXX in English/Chinese/Chinese Taiwan (#1170)
## Fixes Or Enhances Add translation of below in English/Chinese/Chinese Taiwan : required_unless required_with required_with_all required_without required_without_all excluded_if excluded_unless excluded_with excluded_with_all excluded_without excluded_without_all **Make sure that you've checked the boxes below before you submit PR:** - [x] Tests exist or have been written that cover this particular change. @go-playground/validator-maintainers
1 parent add493f commit 37a1071

File tree

6 files changed

+549
-140
lines changed

6 files changed

+549
-140
lines changed

translations/en/en.go

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,66 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er
3434
translation: "{0} is a required field",
3535
override: false,
3636
},
37+
{
38+
tag: "required_unless",
39+
translation: "{0} is a required field",
40+
override: false,
41+
},
42+
{
43+
tag: "required_with",
44+
translation: "{0} is a required field",
45+
override: false,
46+
},
47+
{
48+
tag: "required_with_all",
49+
translation: "{0} is a required field",
50+
override: false,
51+
},
52+
{
53+
tag: "required_without",
54+
translation: "{0} is a required field",
55+
override: false,
56+
},
57+
{
58+
tag: "required_without_all",
59+
translation: "{0} is a required field",
60+
override: false,
61+
},
62+
{
63+
tag: "excluded_if",
64+
translation: "{0} is an excluded field",
65+
override: false,
66+
},
67+
{
68+
tag: "excluded_unless",
69+
translation: "{0} is an excluded field",
70+
override: false,
71+
},
72+
{
73+
tag: "excluded_with",
74+
translation: "{0} is an excluded field",
75+
override: false,
76+
},
77+
{
78+
tag: "excluded_with_all",
79+
translation: "{0} is an excluded field",
80+
override: false,
81+
},
82+
{
83+
tag: "excluded_without",
84+
translation: "{0} is an excluded field",
85+
override: false,
86+
},
87+
{
88+
tag: "excluded_without_all",
89+
translation: "{0} is an excluded field",
90+
override: false,
91+
},
92+
{
93+
tag: "isdefault",
94+
translation: "{0} must be default value",
95+
override: false,
96+
},
3797
{
3898
tag: "len",
3999
customRegisFunc: func(ut ut.Translator) (err error) {

0 commit comments

Comments
 (0)