Skip to content

Commit

Permalink
Fix error for integer field type
Browse files Browse the repository at this point in the history
integer field type returns 'null' for not specified min or max values rather than 'false'
  • Loading branch information
darinda authored and MarioBlazek committed Jul 13, 2017
1 parent 19850d1 commit f07b12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Form/FieldTypeHandler/IntegerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ protected function buildFieldForm(
$min = $fieldDefinition->getValidatorConfiguration()['IntegerValueValidator']['minIntegerValue'];
$max = $fieldDefinition->getValidatorConfiguration()['IntegerValueValidator']['maxIntegerValue'];

if ($min !== false) {
if ($min !== null) {
$rangeConstraints['min'] = $min;
}

if ($max !== false) {
if ($max !== null) {
$rangeConstraints['max'] = $max;
}

Expand Down

0 comments on commit f07b12e

Please sign in to comment.