MCPcopy Create free account
hub / github.com/gogs/gogs / HasError

Method HasError

internal/context/context.go:100–108  ·  view source on GitHub ↗

HasError returns true if error occurs in form validation.

()

Source from the content-addressed store, hash-verified

98
99// HasError returns true if error occurs in form validation.
100func (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.
111func (c *Context) HasValue(name string) bool {

Callers 15

InstallPostFunction · 0.80
LoginPostFunction · 0.80
SignUpPostFunction · 0.80
SettingsPostFunction · 0.80
SettingsPasswordPostFunction · 0.80
SettingsEmailPostFunction · 0.80
SettingsSSHKeysPostFunction · 0.80
ApplicationsPostMethod · 0.80
CreatePostFunction · 0.80
NewTeamPostFunction · 0.80
EditTeamPostFunction · 0.80
SettingsPostFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected