validators

package
v1.2.85 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidateRegister

func AddValidateRegister(register ValidateRegister)

func Validate

func Validate(value interface{}) (err errors.CodeError)

Validate field tag is validate message tag is validate-message or message

func ValidateWithErrorTitle

func ValidateWithErrorTitle(value interface{}, title string) (err errors.CodeError)

Types

type ValidateRegister

type ValidateRegister func(validate *validator.Validate) *validator.Validate

type Validator

type Validator interface {
	Validate(v interface{}) (err errors.CodeError)
}

Jump to

Keyboard shortcuts

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