form

package
v0.0.0-...-2776abb Latest Latest
Warning

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

Go to latest
Published: May 6, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormHelper

type FormHelper struct {
	Session   *http.Session
	Model     interface{}
	Values    map[string]string
	HasErrors bool
	Rules     map[string][]*Rule
	Errors    map[string]map[string]error
}

func New

func New(session *http.Session, model interface{}) *FormHelper

func (*FormHelper) Populate

func (fh *FormHelper) Populate(multipart bool) *FormHelper

func (*FormHelper) Validate

func (fh *FormHelper) Validate() *FormHelper

type Rule

type Rule struct {
	Name       string
	Parameters string
	Function   func(string) error
}

func MaxLength

func MaxLength(parameters string) *Rule

func MinLength

func MinLength(parameters string) *Rule

Jump to

Keyboard shortcuts

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