Merge pull request #716 from 4eek/docfix-validations-HasErrors

Fixed docs: HasErrors is a method not a variable
This commit is contained in:
astaxie 2014-07-29 22:04:26 +08:00
commit 509af636b1
1 changed files with 1 additions and 1 deletions

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 {