restrict v7
This commit is contained in:
@@ -46,4 +46,8 @@ type AnswerFollowUpQuestion struct {
|
||||
// 不做自由文本 —— 否则举报框本身就成了新的辱骂输入口。
|
||||
type ReportQuestion struct {
|
||||
Reason string `form:"reason" valid:"required;maxlen:32" label:"举报理由" msg:"report.errInvalidReason"`
|
||||
// Recaptcha 由算数验证码弹窗回填(格式 id:答案)。
|
||||
// 刻意不加 valid:required:空值交由 captcha.Verify 判定,
|
||||
// 否则 Bind 失败会被上层统一提示成「请选择一个举报理由」,误导用户。
|
||||
Recaptcha string `form:"g-recaptcha-response"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user