validator

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultValidator

type DefaultValidator struct {
	Validator *validator.Validate
}

DefaultValidator implements the Echo#Validator interface.

func (*DefaultValidator) Validate

func (dv *DefaultValidator) Validate(data interface{}) error

Validate implements the `Echo#Validator.Validate` function.

type ValidationError

type ValidationError struct {
	Err error
}

ValidationError implements the builtin `error` interface and extends custom output function.

func (*ValidationError) ErrCollection

func (ve *ValidationError) ErrCollection() []map[string]string

ErrCollection formats the validation errors and return it as a slice.

func (*ValidationError) Error

func (ve *ValidationError) Error() string

Error implements the builtin `error.Error` function.

type ValidatorFunc

type ValidatorFunc func(*validator.Validate) error

Jump to

Keyboard shortcuts

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