Documentation
¶
Index ¶
- func IsCIDR(i interface{}, others map[string]interface{}) error
- func IsFilepath(i interface{}, others map[string]interface{}) error
- func IsIP(i interface{}, others map[string]interface{}) (err error)
- func IsInEnumIgnoreCase(items ...string) validatorFunc
- func List(r Rule) (required []string, optionals []string, suggested []string)
- func MaxLengthOf(l int) validatorFunc
- func MinLengthOf(l int) validatorFunc
- func Run(r Rule, input []string) error
- func SpecBuilder(r Rule, vs ...Validators) *specBuilder
- func Suggested(s ...string) (sugs []suggested)
- func Validate(all Validators, paramValues map[string]interface{}) error
- type Reducer
- type Rule
- type Spec
- type Validators
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpecBuilder ¶
func SpecBuilder(r Rule, vs ...Validators) *specBuilder
func Validate ¶
func Validate(all Validators, paramValues map[string]interface{}) error
Types ¶
type Reducer ¶
type Rule ¶
type Spec ¶
type Spec interface {
Rule() Rule
Reducers() []Reducer
Validators() Validators
}
func NewSpec ¶
func NewSpec(r Rule, vs ...Validators) Spec
Source Files
¶
- reduce.go
- rules.go
- spec.go
- validation.go
Click to show internal directories.
Click to hide internal directories.