forms

package
v0.0.0-...-5e8a461 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) MaxLength

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

Implement a MaxLength method to check that a specific field in the form contains a maximum number of characters. If the check fails then add the appropriate message to the form errors.

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