Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewValidator, wire.Bind(new(validate.IValidator), new(*Validator)))
ProviderSet is the validator providers.
Functions ¶
func GetExportedFieldNames ¶
GetExportedFieldNames 返回传入结构体中所有可导出的字段名字.
func ValidRequired ¶
ValidRequired 验证结构体中的必需字段是否存在且不为空.
func ValidateAllFields ¶
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator implements the validate.IValidator interface.
func NewValidator ¶
NewValidator creates and initializes a custom validator.
Click to show internal directories.
Click to hide internal directories.