valid

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidator

func AddValidator(vs ...*Validator)

AddValidator add or reset the validator

func Validation

func Validation(err error) error

Validation convert error to error msg

Types

type Validator

type Validator struct {
	Tag   string         // tag name
	Msg   string         // error msg
	Field string         // field name
	Func  validator.Func // validator function
}

Validator struct

func NewValidator

func NewValidator(tag, msg string, f validator.Func) *Validator

Jump to

Keyboard shortcuts

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