validator

package
v0.0.0-...-841437a Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const Key = "Validator"

Variables

This section is empty.

Functions

func Factory

func Factory(_ axon.Injector, _ axon.Args) axon.Instance

Types

type Package

type Package struct {
}

func (*Package) Bindings

func (*Package) Bindings() []axon.Binding

type TagErrorFactory

type TagErrorFactory func(e validator.FieldError) string

type TagErrorMap

type TagErrorMap map[string]TagErrorFactory

type ValidationError

type ValidationError struct {
	OriginalError validator.FieldError
	Msg           string
}

func (ValidationError) Error

func (v ValidationError) Error() string

type ValidationErrorMutator

type ValidationErrorMutator func(*ValidationError)

type ValidationErrors

type ValidationErrors []ValidationError

func (ValidationErrors) Error

func (v ValidationErrors) Error() string

type Validator

type Validator interface {
	Struct(strct interface{}) error
	OnError(vem ValidationErrorMutator, tags ...string)
	TagErrors() TagErrorMap
}

Jump to

Keyboard shortcuts

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