daf8b110 by Kevin Fourie

Fixed docs: HasErrors is a method not a variable

1 parent cec151fd
...@@ -33,7 +33,7 @@ Direct Use: ...@@ -33,7 +33,7 @@ Direct Use:
33 valid.Required(u.Name, "name") 33 valid.Required(u.Name, "name")
34 valid.MaxSize(u.Name, 15, "nameMax") 34 valid.MaxSize(u.Name, 15, "nameMax")
35 valid.Range(u.Age, 0, 140, "age") 35 valid.Range(u.Age, 0, 140, "age")
36 if valid.HasErrors { 36 if valid.HasErrors() {
37 // validation does not pass 37 // validation does not pass
38 // print invalid message 38 // print invalid message
39 for _, err := range valid.Errors { 39 for _, err := range valid.Errors {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!