fix(comment): add comment original text notblank condition

This commit is contained in:
LinkinStar 2023-02-02 17:40:39 +08:00
parent af5e3f4e48
commit b7356ba875
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ type AddCommentReq struct {
// reply comment id
ReplyCommentID string `validate:"omitempty" json:"reply_comment_id"`
// original comment content
OriginalText string `validate:"required,gte=2,lte=600" json:"original_text"`
OriginalText string `validate:"required,notblank,gte=2,lte=600" json:"original_text"`
// parsed comment content
ParsedText string `json:"-"`
// @ user id list
@ -47,7 +47,7 @@ type UpdateCommentReq struct {
// comment id
CommentID string `validate:"required" json:"comment_id"`
// original comment content
OriginalText string `validate:"required,gte=2,lte=600" json:"original_text"`
OriginalText string `validate:"required,notblank,gte=2,lte=600" json:"original_text"`
// parsed comment content
ParsedText string `json:"-"`
// user id