feat: face login test account
CI / changes (push) Has been cancelled
CI / ad (push) Has been cancelled
CI / admin (push) Has been cancelled
CI / aiserver (push) Has been cancelled
CI / analysis (push) Has been cancelled
CI / bff (push) Has been cancelled
CI / chore (push) Has been cancelled
CI / equipment (push) Has been cancelled
CI / express (push) Has been cancelled
CI / factory (push) Has been cancelled
CI / message (push) Has been cancelled
CI / order (push) Has been cancelled
CI / payment (push) Has been cancelled
CI / percutaneous (push) Has been cancelled
CI / product (push) Has been cancelled
CI / record (push) Has been cancelled
CI / sale (push) Has been cancelled
CI / store (push) Has been cancelled
CI / support (push) Has been cancelled
CI / task (push) Has been cancelled
CI / user (push) Has been cancelled
CI / water (push) Has been cancelled
CI / wecom (push) Has been cancelled
CI / ws (push) Has been cancelled

This commit is contained in:
zzw
2026-11-03 14:46:52 +08:00
parent bcd539662b
commit 8413ba5e55
2 changed files with 17 additions and 10 deletions
+14 -10
View File
@@ -61,22 +61,26 @@ func (p LoginValidator) GetMessage() validate.ValidatorMessages {
}
type UpdateValidator struct {
Name string `validate:"omitempty,max=64"`
Avatar string `validate:"omitempty,max=512"`
Gender uint32 `validate:"omitempty,oneof=0 1 2 3"`
Birthday string `validate:"omitempty,max=32"`
Name string `validate:"required,max=64"`
Avatar string `validate:"required,max=512"`
Gender uint32 `validate:"required,oneof=1 2 3"`
Birthday string `validate:"required,max=32"`
Mobile string `validate:"omitempty,len=11"`
RealName string `validate:"omitempty,max=64"`
}
func (p UpdateValidator) GetMessage() validate.ValidatorMessages {
return validate.ValidatorMessages{
"Name.max": "昵称过长",
"Avatar.max": "头像地址过长",
"Gender.oneof": "性别不正确",
"Birthday.max": "生日过长",
"Mobile.len": "手机号格式不正确",
"RealName.max": "真实姓名过长",
"Name.required": "昵称不能为空",
"Name.max": "昵称过长",
"Avatar.required": "头像不能为空",
"Avatar.max": "头像地址过长",
"Gender.required": "性别不能为空",
"Gender.oneof": "性别不正确",
"Birthday.required": "生日不能为空",
"Birthday.max": "生日过长",
"Mobile.len": "手机号格式不正确",
"RealName.max": "真实姓名过长",
}
}