Skip to content

Commit

Permalink
simplify size check
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 6, 2013
1 parent d2cce28 commit d647c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Validator.pm
Expand Up @@ -34,7 +34,7 @@ sub _like { $_[2] !~ $_[3] }
sub _size {
my ($validation, $name, $value, $min, $max) = @_;
my $len = length $value;
return !($len >= $min && $len <= $max);
return $len < $min || $len > $max;
}

1;
Expand Down

0 comments on commit d647c94

Please sign in to comment.