Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, register RuleRegister)
Types ¶
type RuleRegister ¶
type RuleRegister func(r contracts.RequestContract, args ...string) rule.Rule
type ValidateError ¶
func (ValidateError) Error ¶
func (v ValidateError) Error() string
func (ValidateError) StatusCode ¶
func (v ValidateError) StatusCode() int
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
var DefaultValidator *Validator
func (*Validator) Passes ¶
func (v *Validator) Passes(req contracts.RequestContract, attribute string, input interface{}, rules []interface{}) (errors []string)
func (*Validator) Register ¶
func (v *Validator) Register(name string, register RuleRegister)
type WithValidation ¶
type WithValidation interface {
Rules() map[string][]interface{}
}
Click to show internal directories.
Click to hide internal directories.