validator

package
v0.0.0-...-8c24d94 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmpty

func IsEmpty(value interface{}) bool

Types

type Validation

type Validation interface {
	Validate() (bool, map[string]string)
}

type Validator

type Validator struct {
	Errors map[string]string
}

func New

func New() *Validator

func (*Validator) EqualToField

func (v *Validator) EqualToField(field string, value interface{}, toEqualField string, toEqualValue interface{}) bool

func (*Validator) IsEmail

func (v *Validator) IsEmail(field, email string) bool

func (*Validator) IsValid

func (v *Validator) IsValid() bool

func (*Validator) MinLength

func (v *Validator) MinLength(field, value string, high int) bool

func (*Validator) Required

func (v *Validator) Required(field string, value interface{}) bool

Jump to

Keyboard shortcuts

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