Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasOnDogsMapAlias ¶
type AliasOnDogsMapAlias DogsMapAlias
func (AliasOnDogsMapAlias) Validate ¶
func (r AliasOnDogsMapAlias) Validate() error
Validate validates AliasOnDogsMapAlias
func (AliasOnDogsMapAlias) ValidateAlias ¶
func (r AliasOnDogsMapAlias) ValidateAlias() error
type Dog ¶
type Dog struct {
Name string `validate:"min_len=1,max_len=64"`
}
func (Dog) ValidateOptional ¶
type DogsMapAlias ¶
func (DogsMapAlias) Validate ¶
func (r DogsMapAlias) Validate() error
Validate validates DogsMapAlias
type InterfaceToSkip ¶
type InterfaceToSkip interface { Method() Can() }
type User ¶
type User struct { Name string `validate:"min_len=3,max_len=64"` LastName *string `json:"last_name" validate:"nullable,min_len=1,max_len=5"` Age uint `validate:"min=18,max=105"` ChildrenCount *int `json:"children_count" validate:"not_null,min=0,max=15"` Float float64 `validate:"min=-4.22,max=42.55"` Dog Dog DogPointer *Dog DogOptional Dog `validate:"func=.ValidateOptional"` Urls []string `validate:"min_items=1,item=[max_len=256]"` Dogs []*Dog `validate:"min_items=1,item=[nullable]"` Test *[]int `validate:"nullable,min_items=1,item=[min=4]"` Flag bool Some interface{} `validate:"func=validateSome"` SomeArray []interface{} `validate:"min_items=1,item=[func=validateSome]"` Dict map[string]int `validate:"min_items=2,key=[max_len=64],value=[min=-35,max=34]"` DictDogs map[string]Dog `validate:"value=[func=.ValidateOptional;validateMaxDogName]"` Alias DogsMapAlias AliasOnAlias AliasOnDogsMapAlias AliasOnAliasWithCustomValidate AliasOnDogsMapAlias `validate:"func=.ValidateAlias"` MapOfMap map[string]map[int]string `validate:"key=[min_len=3],value=[min_items=1,value=[min_len=3]]"` MapOfSlice map[string][]string `validate:"value=[min_items=1,item=[max_len=256]]"` SliceOfMap []map[string]int `validate:"item=[min_items=1,key=[min_len=3],value=[min=1]]"` SliceOfSliceOfSlice [][][]string `validate:"min_items=1,item=[min_items=1,item=[min_items=1,item=[max_len=256]]]"` MapWithoutValidation map[string]interface{} SliceWithoutValidation []interface{} FuncField func(int) string ChanField <-chan int ByteField byte ByteArray []byte }
Click to show internal directories.
Click to hide internal directories.