Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRule ¶
func AddRule(key string, rule ValidationRule)
func AddTypeRule ¶
Types ¶
type TypeRule ¶
type TypeRule struct { ArgCount int Int func(value int64, arguments TypeRuleArguments) bool Uint func(value uint64, arguments TypeRuleArguments) bool Float func(value float64, arguments TypeRuleArguments) bool String func(value string, arguments TypeRuleArguments) bool Bool func(value bool, arguments TypeRuleArguments) bool Time func(value time.Time, arguments TypeRuleArguments) bool Array func(value reflect.Value, arguments TypeRuleArguments) bool }
type TypeRuleArguments ¶
type TypeRuleArguments []string
func (TypeRuleArguments) GetBoolean ¶
func (a TypeRuleArguments) GetBoolean(i int) bool
func (TypeRuleArguments) GetFloat ¶
func (a TypeRuleArguments) GetFloat(i int) float64
func (TypeRuleArguments) GetInt ¶
func (a TypeRuleArguments) GetInt(i int) int64
func (TypeRuleArguments) GetString ¶
func (a TypeRuleArguments) GetString(i int) string
func (TypeRuleArguments) GetUint ¶
func (a TypeRuleArguments) GetUint(i int) uint64
type ValidationOptions ¶
type ValidationRule ¶
type ValidationRule func(options *ValidationOptions) bool
func GetRule ¶
func GetRule(key string) (ValidationRule, bool)
Click to show internal directories.
Click to hide internal directories.