feat: ota
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package validator
|
||||
|
||||
import "lone-services/pkg/validate"
|
||||
|
||||
type UploadValidator struct {
|
||||
Filename string `validate:"required,max=255"`
|
||||
Content []byte `validate:"required,min=1"`
|
||||
}
|
||||
|
||||
func (p UploadValidator) GetMessage() validate.ValidatorMessages {
|
||||
return validate.ValidatorMessages{
|
||||
"Filename.required": "文件名不能为空",
|
||||
"Filename.max": "文件名过长",
|
||||
"Content.required": "文件内容不能为空",
|
||||
"Content.min": "文件内容不能为空",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user