1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 18:50:55 +00:00

Fixed docs: HasErrors is a method not a variable

This commit is contained in:
Kevin Fourie 2014-07-29 15:05:04 +02:00
parent cec151fda7
commit daf8b1101f

View File

@ -33,7 +33,7 @@ Direct Use:
valid.Required(u.Name, "name")
valid.MaxSize(u.Name, 15, "nameMax")
valid.Range(u.Age, 0, 140, "age")
if valid.HasErrors {
if valid.HasErrors() {
// validation does not pass
// print invalid message
for _, err := range valid.Errors {