表单解析增加表单验证,使用 => github.com/go-playground/validator/v10

This commit is contained in:
2022-10-16 16:45:47 +08:00
parent 6d2ea0ce59
commit 7678ee10ba
4 changed files with 42 additions and 8 deletions

View File

@ -7,6 +7,8 @@
// Date : 2022-07-03 00:52
package request
import "github.com/go-playground/validator/v10"
var (
// Form 表单相关操作
Form *form
@ -15,6 +17,8 @@ var (
)
func init() {
Form = &form{}
Form = &form{
checkInstance: validator.New(),
}
ContentType = &contentType{}
}