validator

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (*defaultValidator, error)

New validator

func RegisterValidation added in v1.2.0

func RegisterValidation(v Validator, tag string, fn validator.Func, callValidationEvenIfNull ...bool) error

func Sort added in v1.2.2

func Sort(f1 validator.FieldLevel) bool

func Var added in v1.2.0

func Var(v Validator, field interface{}, tag string) error

Types

type Validator added in v1.2.0

type Validator interface {
	ValidateStruct(obj interface{}) error
	Engine() interface{}
}

func NewValidator added in v1.2.0

func NewValidator() Validator

Jump to

Keyboard shortcuts

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