Bool binds a form field to a bool variable. It populates an error if the value is not bool. var foo bool ctx.FormData().Bool("foo", &foo, true)
(key string, target *bool, defaultValue bool)
| 90 | // |
| 91 | // ctx.FormData().Bool("foo", &foo, true) |
| 92 | func (form *FormData) Bool(key string, target *bool, defaultValue bool) *FormData { |
| 93 | return form.mustValue(key, target, defaultValue) |
| 94 | } |
| 95 | |
| 96 | // MandatoryBool binds a form field to a bool variable. It populates an |
| 97 | // error if the value is not bool, is empty, or the "key" does not exist. |