Permalink
Browse files

Required() is now satisfied by any non-zero integer

  • Loading branch information...
1 parent 4009bd7 commit 9c1843718f060fb9383bf83122fc38a05963e6e9 @robfig robfig committed Sep 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 validation.go
View
@@ -92,7 +92,7 @@ func (r Required) IsSatisfied(obj interface{}) bool {
return b
}
if i, ok := obj.(int); ok {
- return i > 0
+ return i != 0
}
if t, ok := obj.(time.Time); ok {
return !t.IsZero()

0 comments on commit 9c18437

Please sign in to comment.