Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RangeConstraint.php

function RangeConstraint::__construct

Overrides Range::__construct

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php, line 26

Class

RangeConstraint
Range constraint.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public function __construct(...$args) {
    $this->notInRangeMessage = 'This value should be between %min and %max.';
    $this->minMessage = 'This value should be %limit or more.';
    $this->maxMessage = 'This value should be %limit or less.';
    parent::__construct(...$args);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal