restrict v6

This commit is contained in:
tamakyi
2026-10-18 22:18:21 +08:00
parent d14d26df17
commit bd81398a06
18 changed files with 621 additions and 10 deletions
+6
View File
@@ -41,3 +41,9 @@ type PublishFollowUpQuestion struct {
type AnswerFollowUpQuestion struct {
Answer string `form:"answer" valid:"required" label:"追问回答" msg:"form.followup.answer"`
}
// ReportQuestion 举报单条内容。理由只接受固定枚举(见 db.IsValidReportReason),
// 不做自由文本 —— 否则举报框本身就成了新的辱骂输入口。
type ReportQuestion struct {
Reason string `form:"reason" valid:"required;maxlen:32" label:"举报理由" msg:"report.errInvalidReason"`
}