Documentation ¶ Index ¶ type Form func New(data url.Values) *Form func (f *Form) MaxLength(field string, d int) func (f *Form) PermittedValues(field string, opts ...string) func (f *Form) Required(fields ...string) func (f *Form) Valid() bool 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 Source Files ¶ View all Source files errors.goform.go Click to show internal directories. Click to hide internal directories.