validators

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLanguage = "zh"
)

Functions

func Check

func Check(params any) map[string][]string

func Init

func Init()

func ValidateMobile

func ValidateMobile(fl validator.FieldLevel) bool

Types

type ErrorResponse

type ErrorResponse struct {
	FailedField string
	Tag         string
	Value       string
}

type Validations

type Validations struct {
	Tag string
	Fn  validator.Func
	Msg string
}

type Validators

type Validators struct {
	Validate *validator.Validate
}

func (*Validators) Check

func (v *Validators) Check(params any) map[string][]string

func (*Validators) Register

func (v *Validators) Register(val *Validations)

Jump to

Keyboard shortcuts

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