1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 05:01:28 +00:00

Set ErrorsMap to nil in Validation.Clear function

This commit is contained in:
Donal Byrne 2015-03-26 20:23:00 +01:00 committed by astaxie
parent 5b1705b2d6
commit a7e60c93dc

View File

@ -107,6 +107,7 @@ type Validation struct {
// Clean all ValidationError. // Clean all ValidationError.
func (v *Validation) Clear() { func (v *Validation) Clear() {
v.Errors = []*ValidationError{} v.Errors = []*ValidationError{}
v.ErrorsMap = nil
} }
// Has ValidationError nor not. // Has ValidationError nor not.