diff --git a/src/Symfony/Component/Validator/Constraints/Range.php b/src/Symfony/Component/Validator/Constraints/Range.php index a916a9625b9e0..b922135ee063e 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -65,7 +65,7 @@ public function __construct($options = null) parent::__construct($options); if (null === $this->min && null === $this->minPropertyPath && null === $this->max && null === $this->maxPropertyPath) { - throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint %s', __CLASS__), ['min', 'max']); + throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint %s', __CLASS__), ['min', 'minPropertyPath', 'max', 'maxPropertyPath']); } } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php index 333edada004a6..052a8ee024f67 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php @@ -22,7 +22,7 @@ public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath() $this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException'); $this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.'); new Range([ - 'max' => 'min', + 'max' => 'max', 'maxPropertyPath' => 'maxPropertyPath', ]); }