update question validate

This commit is contained in:
aichy126 2023-02-02 16:50:37 +08:00
parent c10dfb9884
commit e3557b9c98
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ type ReopenQuestionReq struct {
type QuestionAdd struct {
// question title
Title string `validate:"required,gte=6,lte=150" json:"title"`
Title string `validate:"required,notblank,gte=6,lte=150" json:"title"`
// content
Content string `validate:"required,notblank,gte=6,lte=65535" json:"content"`
// html
@ -90,7 +90,7 @@ type QuestionUpdate struct {
// question id
ID string `validate:"required" json:"id"`
// question title
Title string `validate:"required,gte=6,lte=150" json:"title"`
Title string `validate:"required,notblank,gte=6,lte=150" json:"title"`
// content
Content string `validate:"required,notblank,gte=6,lte=65535" json:"content"`
// html