validator

package
v0.0.0-...-630bfab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Params

type Params interface {
	Validate() error
}

type ValidationHandler

type ValidationHandler struct {
	Tag          string
	Func         validator.Func
	ErrorMessage string
}

func NewCustomValidator

func NewCustomValidator() (configs []ValidationHandler)

type Validator

type Validator struct {
	Validator           *validator.Validate
	ValidatorHandlerMap map[string]ValidationHandler
}

func NewValidator

func NewValidator(customValidators []ValidationHandler) *Validator

func (*Validator) Validate

func (v *Validator) Validate(params interface{}) (err error)

Jump to

Keyboard shortcuts

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