Documentation ¶
Overview ¶
Package form implements a handler for post and get forms.
For a full guide visit http://github.com/codegangsta/martini
package main import ( "github.com/codegangsta/martini" "github.com/codegangsta/martini-contrib/form" ) type BlogPost struct{ Title string `form:"title,required"` Content string `form:"content"` } func main() { m := martini.Classic() m.Get("/", form.Form(&BlogPost{}), func(blogpost *BlogPost) string { return blogpost.Title }) m.Run() }
Index ¶
Constants ¶
View Source
const ( // Error for fields which are marked as required but weren't present in the form. RequireError string = "RequireError" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.