PostValueInt16 returns the last parsed form data matches the given "name" key from POST, PATCH, or PUT body request parameters as int16. See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
(name string)
| 2106 | // |
| 2107 | // See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully. |
| 2108 | func (ctx *Context) PostValueInt16(name string) (int16, error) { |
| 2109 | value, err := ctx.PostValueString(name) |
| 2110 | if err != nil { |
| 2111 | return 0, err |
| 2112 | } |
| 2113 | |
| 2114 | return strParseInt16(value) |
| 2115 | } |
| 2116 | |
| 2117 | // PostValueInt16Default same as PostValueInt16 but if errored it returns |
| 2118 | // the given "def" default value. |
no test coverage detected