Documentation ¶
Index ¶
- func NewValidation[T interface{}](fields map[string]*RuleList) *validation[T]
- type RuleList
- func (ruleList *RuleList) Custom(rule ValidationRule) *RuleList
- func (ruleList *RuleList) Email() *RuleList
- func (ruleList *RuleList) Execute(key string, value interface{}) (interface{}, []string)
- func (ruleList *RuleList) MaxLength(maxLenght int) *RuleList
- func (ruleList *RuleList) MaxValue(maxValue float64) *RuleList
- func (ruleList *RuleList) MinLength(minLenght int) *RuleList
- func (ruleList *RuleList) MinValue(minValue float64) *RuleList
- func (ruleList *RuleList) Number() *RuleList
- func (ruleList *RuleList) Required() *RuleList
- func (ruleList *RuleList) SameAs(field string) *RuleList
- func (ruleList *RuleList) Trim() *RuleList
- func (ruleList *RuleList) UseValues(values *map[string]interface{})
- type ValidationRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValidation ¶ added in v1.0.3
Types ¶
type RuleList ¶
type RuleList struct { Values *map[string]interface{} Rules []ValidationRule }
func (*RuleList) Custom ¶ added in v1.0.3
func (ruleList *RuleList) Custom(rule ValidationRule) *RuleList
type ValidationRule ¶
Click to show internal directories.
Click to hide internal directories.