26 lines
660 B
Go
26 lines
660 B
Go
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 必传",
|
|
}
|
|
}
|
|
|
|
type ApiSystemInfoValidator struct {
|
|
Type int32 `form:"type" json:"type" validate:"required"`
|
|
}
|
|
|
|
func (p ApiSystemInfoValidator) GetMessage() validate.ValidatorMessages {
|
|
return validate.ValidatorMessages{
|
|
"Type.required": "Type 必传",
|
|
}
|
|
}
|