3 namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
5 use Symfony\Component\Validator\Constraints\Range;
10 * Overrides the symfony constraint to use Drupal-style replacement patterns.
12 * @todo: Move this below the TypedData core component.
16 * label = @Translation("Range", context = "Validation"),
17 * type = { "integer", "float" }
20 class RangeConstraint extends Range {
22 public $minMessage = 'This value should be %limit or more.';
23 public $maxMessage = 'This value should be %limit or less.';
28 public function validatedBy() {
29 return '\Symfony\Component\Validator\Constraints\RangeValidator';