订单下载。jd下单。。
CI / changes (push) Successful in 37s
CI / ad (push) Successful in 29s
CI / admin (push) Successful in 17s
CI / bff (push) Successful in 13s
CI / chore (push) Successful in 15s
CI / equipment (push) Successful in 14s
CI / express (push) Successful in 14s
CI / product (push) Successful in 13s
CI / record (push) Successful in 13s
CI / sale (push) Successful in 13s
CI / task (push) Successful in 13s
CI / user (push) Successful in 14s
CI / wecom (push) Successful in 13s
CI / changes (push) Successful in 37s
CI / ad (push) Successful in 29s
CI / admin (push) Successful in 17s
CI / bff (push) Successful in 13s
CI / chore (push) Successful in 15s
CI / equipment (push) Successful in 14s
CI / express (push) Successful in 14s
CI / product (push) Successful in 13s
CI / record (push) Successful in 13s
CI / sale (push) Successful in 13s
CI / task (push) Successful in 13s
CI / user (push) Successful in 14s
CI / wecom (push) Successful in 13s
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
type AnswerCreateValidator struct {
|
||||
Question string `form:"question" json:"question" validate:"required"`
|
||||
Explain string `form:"explain" json:"explain" validate:"required"`
|
||||
Right string `form:"right" json:"right" validate:"required"`
|
||||
Answers string `form:"answers" json:"answers" validate:"required"`
|
||||
}
|
||||
|
||||
// GetMessage 提示消息
|
||||
func (p AnswerCreateValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Question.required": "问题必须填写",
|
||||
"Explain.required": "补充说明必须填写",
|
||||
"Right.required": "正常答案必须填写",
|
||||
"Answers.required": "选择答案必须填写",
|
||||
}
|
||||
}
|
||||
|
||||
type AnswerEditValidator struct {
|
||||
Id int64 `form:"id" json:"id" validate:"required"`
|
||||
Question string `form:"question" json:"question" validate:"required"`
|
||||
Explain string `form:"explain" json:"explain" validate:"required"`
|
||||
Right string `form:"right" json:"right" validate:"required"`
|
||||
Answers string `form:"answers" json:"answers" validate:"required"`
|
||||
}
|
||||
|
||||
// GetMessage 提示消息
|
||||
func (p AnswerEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
validate.FieldId: validate.FieldIdValue,
|
||||
"Question.required": "问题必须填写",
|
||||
"Explain.required": "补充说明必须填写",
|
||||
"Right.required": "正常答案必须填写",
|
||||
"Answers.required": "选择答案必须填写",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
type SystemEditValidator struct {
|
||||
Type int32 `form:"type" json:"type" validate:"required"`
|
||||
Content string `form:"content" json:"content" validate:"required"`
|
||||
}
|
||||
|
||||
func (p SystemEditValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Type.required": "Type 必传",
|
||||
"Content.required": "Content 必传",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user