fix validator

This commit is contained in:
2025-08-18 18:18:04 +08:00
parent 59b3d76f57
commit ecfe7a6fd6
3 changed files with 4 additions and 4 deletions

View File

@@ -141,7 +141,7 @@ func registerCustomFieldTranslations(validate *validator.Validate, trans ut.Tran
// 产品代码翻译
validate.RegisterTranslation("product_code", trans, func(ut ut.Translator) error {
return ut.Add("product_code", "{0}格式不正确只能包含字母、数字、下划线、连字符长度3-50位", true)
return ut.Add("product_code", "{0}格式不正确,只能包含字母、数字、下划线、连字符、中英文括号长度3-50位", true)
}, func(ut ut.Translator, fe validator.FieldError) string {
t, _ := ut.T("product_code", getFieldDisplayName(fe.Field()))
return t