refactor: validator调整

This commit is contained in:
meilin.huang
2023-08-04 12:22:21 +08:00
parent c2ee4f9955
commit 3ae7e0de75
9 changed files with 156 additions and 54 deletions

View File

@@ -2,7 +2,7 @@ package form
type AccountCreateForm struct {
Id uint64 `json:"id"`
Name string `json:"name" binding:"required,max=16"`
Name string `json:"name" binding:"required,max=16" msg:"required=姓名不能为空,max=姓名最大长度不能超过16位"`
Username string `json:"username" binding:"pattern=account_username"`
Password string `json:"password"`
}