Browse Source

Return a more descriptive error message in integer range validation.

Bozhin Zafirov 2 years ago
parent
commit
9c7adcba22
1 changed files with 1 additions and 1 deletions
  1. 1 1
      validators.go

+ 1 - 1
validators.go

@@ -81,7 +81,7 @@ func ValidBetween(min, max int) ValidatorFunc {
 	return func(field FormField, ctx context.Context) error {
 		value, err := field.GetInt()
 		if err != nil {
-			return err
+			return EInvalidInteger
 		}
 		if value < min || value > max {
 			return EInvalidInterval