validatorext

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "Validator"
)

Variables

This section is empty.

Functions

func IsEmail

func IsEmail(v string) error

func IsPhone

func IsPhone(v string) error

func Struct

func Struct(s any, fields ...string) error

Types

type EnumValidation

type EnumValidation interface {
	InRange(v any) bool
}

type Validate

type Validate struct {
	*validator.Validate
}

func New

func New() *Validate

func (*Validate) SetDefault

func (v *Validate) SetDefault()

func (*Validate) Struct

func (v *Validate) Struct(s any, fields ...string) error

type Validation

type Validation struct {
	Field string
	Tag   string
}

func ParseError

func ParseError(err error) []*Validation

Jump to

Keyboard shortcuts

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