Int binds a form field to an int variable. It populates an error if the value is not int. var foo int ctx.FormData().Int("foo", &foo, 2)
(key string, target *int, defaultValue int)
| 110 | // |
| 111 | // ctx.FormData().Int("foo", &foo, 2) |
| 112 | func (form *FormData) Int(key string, target *int, defaultValue int) *FormData { |
| 113 | return form.mustValue(key, target, defaultValue) |
| 114 | } |
| 115 | |
| 116 | // MandatoryInt binds a form field to an int variable. It populates an |
| 117 | // error if the value is not int, or is empty, or the "key" does not exist. |