Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TagMap = map[string]BasicValidator{
"nonempty": isNonEmpty,
"email": isEmail,
"url": isURL,
"number": isNumber,
"alphabet": isAlphabet,
}
TagMap is to map tag name of struct to function
View Source
var TagMapCal = map[string]CalcValidator{
"min": isMinOK,
"max": isMaxOK,
}
TagMapCal is to map tag name of struct to function
Functions ¶
func CheckValidation ¶
CheckValidation to check validation after extracted tag from struct type.
Types ¶
type BasicValidator ¶
BasicValidator is validator function
type CalcValidator ¶
CalcValidator is validator function
Click to show internal directories.
Click to hide internal directories.