function AllowedValuesConstraint::__construct
Same name in other branches
- 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraint::__construct()
File
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ AllowedValuesConstraint.php, line 23
Class
- AllowedValuesConstraint
- Checks for the value being allowed.
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintCode
public function __construct(...$args) {
$this->strict = TRUE;
$this->minMessage = 'You must select at least %limit choice.|You must select at least %limit choices.';
$this->maxMessage = 'You must select at most %limit choice.|You must select at most %limit choices.';
parent::__construct(...$args);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.