Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation of requiredXXX and excludedXXX in English/Chinese/Chinese Taiwan #1170

Merged
merged 5 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions translations/en/en.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,66 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er
translation: "{0} is a required field",
override: false,
},
{
tag: "required_unless",
translation: "{0} is a required field",
override: false,
},
{
tag: "required_with",
translation: "{0} is a required field",
override: false,
},
{
tag: "required_with_all",
translation: "{0} is a required field",
override: false,
},
{
tag: "required_without",
translation: "{0} is a required field",
override: false,
},
{
tag: "required_without_all",
translation: "{0} is a required field",
override: false,
},
{
tag: "excluded_if",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "excluded_unless",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "excluded_with",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "excluded_with_all",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "excluded_without",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "excluded_without_all",
translation: "{0} is an excluded field",
override: false,
},
{
tag: "isdefault",
translation: "{0} must be default value",
override: false,
},
{
tag: "len",
customRegisFunc: func(ut ut.Translator) (err error) {
Expand Down
Loading