Documentation ¶
Index ¶
- Constants
- Variables
- func Capitalize(str string) string
- func Validate(i interface{}) error
- type Tag
- func (n Tag) EmailValidate(v reflect.Value) bool
- func (n Tag) Equals(v reflect.Value) (bool, string)
- func (n Tag) GreaterThan(v reflect.Value) (bool, string)
- func (n Tag) GreaterThanOrEqual(v reflect.Value) (bool, string)
- func (n Tag) LengthValidate(v reflect.Value) (bool, string)
- func (n Tag) LessThan(v reflect.Value) (bool, string)
- func (n Tag) LessThanOrEqual(v reflect.Value) (bool, string)
- func (n Tag) MaxValidate(v reflect.Value) (bool, string)
- func (n Tag) MinValidate(v reflect.Value) (bool, string)
- func (n Tag) NoSpaceValidate(v reflect.Value) (bool, string)
- func (n Tag) NotEqual(v reflect.Value) (bool, string)
- func (n Tag) UrlValidate(v reflect.Value) (bool, string)
Constants ¶
View Source
const (
IgnoreFields = "-"
)
Variables ¶
View Source
var ( EMAIL_REG = regexp.MustCompile(emailPattern) URL_REG = regexp.MustCompile(emailPattern) )
Functions ¶
func Capitalize ¶ added in v0.0.2
Types ¶
type Tag ¶
type Tag struct { // Tag string Eq string `method:"Equals"` Gt string `method:"GreaterThan"` Gte string `method:"GreaterThanOrEqual"` Lt string `method:"LessThan"` Lte string `method:"LessThanOrEqual"` Ne string `method:"NotEqual"` Min int `method:"MaxValidate"` Max int `method:"MinValidate"` Length int `method:"LengthValidate"` Email bool `method:"EmailValidate"` Url bool `method:"UrlValidate"` NoSpace bool `method:"NoSpaceValidate"` }
Click to show internal directories.
Click to hide internal directories.