feat: internal product items
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
type DocumentValidator struct {
|
||||
Type int32 `validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
func (p DocumentValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Type.required": "类型不能为空",
|
||||
"Type.gt": "类型必须大于0",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user