mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 00:30: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
|
return e.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Implement Error interface.
|
||||||
|
// Return e.String()
|
||||||
|
func (e *Error) Error() string { return e.String() }
|
||||||
|
|
||||||
// Result is returned from every validation method.
|
// Result is returned from every validation method.
|
||||||
// It provides an indication of success, and a pointer to the Error (if any).
|
// It provides an indication of success, and a pointer to the Error (if any).
|
||||||
type Result struct {
|
type Result struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user