HasError returns true if error occurs in form validation.
()
| 98 | |
| 99 | // HasError returns true if error occurs in form validation. |
| 100 | func (c *Context) HasError() bool { |
| 101 | hasErr, ok := c.Data["HasError"] |
| 102 | if !ok { |
| 103 | return false |
| 104 | } |
| 105 | c.Flash.ErrorMsg = c.Data["ErrorMsg"].(string) |
| 106 | c.Data["Flash"] = c.Flash |
| 107 | return hasErr.(bool) |
| 108 | } |
| 109 | |
| 110 | // HasValue returns true if value of given name exists. |
| 111 | func (c *Context) HasValue(name string) bool { |
no outgoing calls
no test coverage detected