function CountConstraint::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\CountConstraint::__construct()
  2. 10 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\CountConstraint::__construct()

Attributes

#[HasNamedArguments]

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php, line 22

Class

CountConstraint
Count constraint.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public function __construct(int|array|null $exactly = NULL, ?int $min = NULL, ?int $max = NULL, ?int $divisibleBy = NULL, ?string $exactMessage = 'This collection should contain exactly %limit element.|This collection should contain exactly %limit elements.', ?string $minMessage = 'This collection should contain %limit element or more.|This collection should contain %limit elements or more.', ?string $maxMessage = 'This collection should contain %limit element or less.|This collection should contain %limit elements or less.', ?string $divisibleByMessage = NULL, ?array $groups = NULL, mixed $payload = NULL, ?array $options = NULL) {
  parent::__construct($exactly, $min, $max, $divisibleBy, $exactMessage, $minMessage, $maxMessage, $divisibleByMessage, $groups, $payload, $options);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.