validate

package
v0.5.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors

type Errors map[string][]string

func (Errors) Add

func (e Errors) Add(field, message string)

func (Errors) Empty

func (e Errors) Empty() bool

func (Errors) First

func (e Errors) First(field string) string

func (Errors) Has

func (e Errors) Has(field string) bool

type Validator

type Validator struct {
	Errors Errors
}

func New

func New() *Validator

func (*Validator) Email

func (v *Validator) Email(field, value string) *Validator

func (*Validator) In

func (v *Validator) In(field, value string, allowed ...string) *Validator

func (*Validator) Integer

func (v *Validator) Integer(field, value string) *Validator

func (*Validator) MaxLength

func (v *Validator) MaxLength(field, value string, max int) *Validator

func (*Validator) MinLength

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

func (*Validator) Required

func (v *Validator) Required(field, value string) *Validator

func (*Validator) SafeText

func (v *Validator) SafeText(field, value string) *Validator

func (*Validator) Slug

func (v *Validator) Slug(field, value string) *Validator

func (*Validator) URL

func (v *Validator) URL(field, value string) *Validator

Jump to

Keyboard shortcuts

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