Skip to content

Commit

Permalink
Merge pull request #15 from Prnyself/master
Browse files Browse the repository at this point in the history
Modify Errors.HasAny() method
  • Loading branch information
markbates authored Feb 6, 2020
2 parents 35aa903 + 08354ad commit b43873a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func (v *Errors) Count() int {
// HasAny returns true/false depending on whether any errors
// have been tracked.
func (v *Errors) HasAny() bool {
if v == nil {
return false
}
return v.Count() > 0
}

Expand Down

0 comments on commit b43873a

Please sign in to comment.