|
|
@ -29,6 +29,36 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er |
|
|
|
translation: "{0}为必填字段", |
|
|
|
translation: "{0}为必填字段", |
|
|
|
override: false, |
|
|
|
override: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_if", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_unless", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_with", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_with_all", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_without", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
tag: "required_without_all", |
|
|
|
|
|
|
|
translation: "{0}为必填字段", |
|
|
|
|
|
|
|
override: false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
tag: "len", |
|
|
|
tag: "len", |
|
|
|
customRegisFunc: func(ut ut.Translator) (err error) { |
|
|
|
customRegisFunc: func(ut ut.Translator) (err error) { |
|
|
|