validate

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTagParsers

func AddTagParsers(parser tagParser)

AddTagParsers used in fieldName

func CheckErrors

func CheckErrors(opts Options) (ok bool, err error)

CheckErrors of validator and return formatted errors:

func G

func G() *validator.Validate

G global validator

Types

type Options

type Options struct {
	Struct    interface{}
	Errors    error
	Formatter func(fields []string) string
}

Options to call CheckErrors method

type Validator

type Validator interface {
	Validate(interface{}) error
}

Validator is the interface that wraps the Validate function.

func Echo

func Echo() Validator

Echo validator

func New

New creates new wrapper of validator for echo.Validator

Jump to

Keyboard shortcuts

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