forms

package
v0.0.0-...-724514a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailRX = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")

Functions

This section is empty.

Types

type Form

type Form struct {
	url.Values
	Errors errors
}

func New

func New(data url.Values) *Form

func (*Form) MatchesPattern

func (f *Form) MatchesPattern(field string, pattern *regexp.Regexp)

func (*Form) MaxLength

func (f *Form) MaxLength(field string, d int)

func (*Form) MinLength

func (f *Form) MinLength(field string, d int)

func (*Form) PermittedValues

func (f *Form) PermittedValues(field string, opts ...string)

func (*Form) Required

func (f *Form) Required(fields ...string)

func (*Form) Valid

func (f *Form) Valid() bool

Jump to

Keyboard shortcuts

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