class Range

@author Bernhard Schussek <bschussek@gmail.com>

@api

Hierarchy

  • class \Symfony\Component\Validator\Constraint
    • class \Symfony\Component\Validator\Constraints\Range

Expanded class hierarchy of Range

7 files declare their use of Range
AllValidatorTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
AnnotationLoaderTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php
CollectionValidatorTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CollectionValidatorTest.php
RangeConstraint.php in drupal/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php
Contains \Drupal\Core\Validation\Plugin\Validation\Constraint\RangeConstraint.
RangeValidatorTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php

... See full list

3 string references to 'Range'
BinaryFileResponse::prepare in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
Prepares the Response before it is sent to the client.
BinaryFileResponseTest::testRequests in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
@dataProvider provideRanges
form_test_menu in drupal/core/modules/system/tests/modules/form_test/form_test.module
Implements hook_menu().

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Constraints/Range.php, line 24

Namespace

Symfony\Component\Validator\Constraints
View source
class Range extends Constraint {
  public $minMessage = 'This value should be {{ limit }} or more.';
  public $maxMessage = 'This value should be {{ limit }} or less.';
  public $invalidMessage = 'This value should be a valid number.';
  public $min;
  public $max;
  public function __construct($options = null) {
    parent::__construct($options);
    if (null === $this->min && null === $this->max) {
      throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array(
        'min',
        'max',
      ));
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Constraint::$groups public property
Constraint::addImplicitGroupName public function Adds the given group if this constraint is in the Default group
Constraint::CLASS_CONSTRAINT constant Marks a constraint that can be put onto classes
Constraint::DEFAULT_GROUP constant The name of the group given to all constraints with no explicit group
Constraint::getDefaultOption public function Returns the name of the default option 12
Constraint::getRequiredOptions public function Returns the name of the required options 10
Constraint::getTargets public function Returns whether the constraint can be put onto classes, properties or both 7
Constraint::PROPERTY_CONSTRAINT constant Marks a constraint that can be put onto properties
Constraint::validatedBy public function Returns the name of the class that validates this constraint 2
Constraint::__set public function Unsupported operation.
Range::$invalidMessage public property
Range::$max public property
Range::$maxMessage public property 1
Range::$min public property
Range::$minMessage public property 1
Range::__construct public function Initializes the constraint with options. Overrides Constraint::__construct