package
Version:
v1.6.0
Opens a new window with list of versions in this module.
Published: Aug 7, 2023
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Validate(dataStruct interface{}) (err error)
Validate 全局model数据验证器
@param 接收一个待数据验证的结构体
@return err 返回错误信息
type ListValidate struct {
Page uint `json:"page" validate:"numeric" label:"页码"`
PageSize uint `json:"pageSize" validate:"numeric" label:"每页大小"`
Keywords string `json:"keywords" validate:"omitempty,max=20" label:"每页大小"`
}
ListValidate 管理员列表验证规则
type Validates struct {
Validate interface{}
}
Validates 全局验证器
Check 验证方法
@param map[string]interface{} data 待验证数据
@return void
Source Files
¶
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common
|
|
|
|
Click to show internal directories.
Click to hide internal directories.