Commit 4f02aece authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(mvc) fix integerfield validation

(cherry picked from commit 940f6ebb)
parent f02ce2e1
...@@ -101,11 +101,11 @@ class IntegerField extends BaseField ...@@ -101,11 +101,11 @@ class IntegerField extends BaseField
{ {
$validators = parent::getValidators(); $validators = parent::getValidators();
if ($this->internalValue != null) { if ($this->internalValue != null) {
$result[] = new MinMaxValidator(array('message' => $this->internalValidationMessage, $validators[] = new MinMaxValidator(array('message' => $this->internalValidationMessage,
"min" => $this->minimum_value, "min" => $this->minimum_value,
"max" => $this->maximum_value "max" => $this->maximum_value
)); ));
$result[] = new IntegerValidator(array('message' => $this->internalValidationMessage)); $validators[] = new IntegerValidator(array('message' => $this->internalValidationMessage));
} }
return $validators; return $validators;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment