Skip to content

Commit

Permalink
Merge pull request #19 from mf16/2.1
Browse files Browse the repository at this point in the history
0 min/max config value should not be treated as null.
  • Loading branch information
RyanThompson authored May 21, 2018
2 parents 53e38f5 + 7d09518 commit 65b4cdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DecimalFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public function getRules()
{
$rules = parent::getRules();

if ($min = array_get($this->config, 'min')) {
if (!is_null($min = array_get($this->config, 'min'))) {
$rules[] = 'min:' . $min;
}

if ($max = array_get($this->config, 'max')) {
if (!is_null($max = array_get($this->config, 'max'))) {
$rules[] = 'max:' . $max;
}

Expand Down

0 comments on commit 65b4cdf

Please sign in to comment.