validator

package
v0.0.0-...-087cd39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultMsg

func GetDefaultMsg(values map[string][]string) string

func GetValidator

func GetValidator(c *gin.Context, validator *Validator, since string) *govalidator.Validator

func ValiUserLogin

func ValiUserLogin(c *gin.Context, validatorName string) (string, bool)

Types

type LoginValidator

type LoginValidator struct {
	Validator
}

type Validator

type Validator struct {
	Sence    map[string][]string
	Rules    map[string][]string
	Messages map[string][]string
	// contains filtered or unexported fields
}

func NewLoginValidator

func NewLoginValidator() *Validator

func ValiFactory

func ValiFactory(valiName string) *Validator

func (*Validator) GetCurrSence

func (validator *Validator) GetCurrSence() string

func (*Validator) GetMessages

func (validator *Validator) GetMessages() map[string][]string

func (*Validator) GetRules

func (validator *Validator) GetRules() map[string][]string

func (*Validator) GetSenceFields

func (validator *Validator) GetSenceFields(sence string) []string

func (*Validator) MatchSence

func (validator *Validator) MatchSence(datas map[string][]string) map[string][]string

func (*Validator) SetSence

func (validator *Validator) SetSence(sence string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL