[Validator][Range] Fix typos

This commit is contained in:
Przemysław Bogusz 2020-03-11 21:51:14 +01:00
parent d0b74453de
commit a08d5191d2
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class Range extends Constraint
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']);
}
}
}

View File

@ -22,7 +22,7 @@ class RangeTest extends TestCase
$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',
]);
}