Files
Go-tool/SourceAnalysisAndTool/validator.v8/testValidator/Data.go
T

34 lines
551 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* @Author : huangzj
* @Time : 2020/12/11 16:16
* @Description
*/
package testValidator
type Ower struct {
Age int `validate:"min=10"`
}
type Cat struct {
Age int `validate:"min=10"`
Ower Ower
}
type Man struct {
Name string `validate:"ipe"`
}
type Woman struct {
Name string `validate:"diy=5"`
}
type Person struct {
Name string
M map[string]int `validate:"min=10"`
H int `validate:"max=20"`
Exist bool `validate:"exists"`
Require bool `validate:"required"`
Cat Cat
}