[Validator][Range] Fix typos
This commit is contained in:
parent
d0b74453de
commit
a08d5191d2
|
@ -65,7 +65,7 @@ class Range extends Constraint
|
||||||
parent::__construct($options);
|
parent::__construct($options);
|
||||||
|
|
||||||
if (null === $this->min && null === $this->minPropertyPath && null === $this->max && null === $this->maxPropertyPath) {
|
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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class RangeTest extends TestCase
|
||||||
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');
|
||||||
$this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.');
|
$this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.');
|
||||||
new Range([
|
new Range([
|
||||||
'max' => 'min',
|
'max' => 'max',
|
||||||
'maxPropertyPath' => 'maxPropertyPath',
|
'maxPropertyPath' => 'maxPropertyPath',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue