Documentation ¶
Index ¶
- Variables
- func IsZero(v reflect.Value) bool
- func NewRegexValidator(pattern string) func(msg string) func(*Context)
- type At
- type Context
- type Error
- type Provider
- type Result
- type Validator
- func AfterNow(msg string) Validator
- func BeforeNow(msg string) Validator
- func Empty(msg string) Validator
- func MaxFloat(msg string, i float64) Validator
- func MaxInt(msg string, i int64) Validator
- func MaxLength(msg string, length int) Validator
- func MaxUint(msg string, i uint64) Validator
- func MinFloat(msg string, i float64) Validator
- func MinInt(msg string, i int64) Validator
- func MinLength(msg string, length int) Validator
- func MinUint(msg string, i uint64) Validator
- func NoEmpty(msg string) Validator
- func OneOf(msg string, list ...interface{}) Validator
- func SameAs(msg string, FieldName string) Validator
- func SliceContains(msg string, item interface{}) Validator
- func StringContains(msg string, item string) Validator
- func Sub(runner func(At)) Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var Email = NewRegexValidator("^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])$")
Functions ¶
func NewRegexValidator ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.