mirror of
https://github.com/astaxie/beego.git
synced 2024-11-24 22:10:54 +00:00
Implement Error interface for validation error
This commit is contained in:
parent
2a2b433e19
commit
77ff15ee33
@ -73,6 +73,10 @@ func (e *Error) String() string {
|
||||
return e.Message
|
||||
}
|
||||
|
||||
// Implement Error interface.
|
||||
// Return e.String()
|
||||
func (e *Error) Error() string { return e.String() }
|
||||
|
||||
// Result is returned from every validation method.
|
||||
// It provides an indication of success, and a pointer to the Error (if any).
|
||||
type Result struct {
|
||||
|
Loading…
Reference in New Issue
Block a user