Documentation ¶
Index ¶
- func Chain(validator *Validator) func(v reflect.Value) error
- func City(v reflect.Value) error
- func CityId(v reflect.Value) error
- func CurrencyCode(v reflect.Value) error
- func Hob(v reflect.Value) error
- func HobId(v reflect.Value) error
- func Latitude(v reflect.Value) error
- func Longitude(v reflect.Value) error
- func NotEmpty(v reflect.Value) error
- func Regexp(re *regexp.Regexp) func(v reflect.Value) error
- type Rule
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrencyCode ¶
Types ¶
type Rule ¶
func StringLength ¶
StringLength validates that a value is a string between min/max length (rune count)
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (*Validator) CheckField ¶
CheckField adds a check to this validator to look at struct field `field` and test this for every rule in `rules`
func (*Validator) CheckMethod ¶
CheckMethod adds a check to this validator to look at an expected method named `method`, and then test the return value from this method against every rule in `rules`
func (*Validator) Validate ¶
func (v *Validator) Validate(s interface{}) *multierror.MultiError
Validate tests all defined checks within this validator against some value `s`
Click to show internal directories.
Click to hide internal directories.