3 namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
5 use Symfony\Component\Validator\Constraints\Choice;
8 * Checks for the value being allowed.
11 * id = "AllowedValues",
12 * label = @Translation("Allowed values", context = "Validation")
15 * @see \Drupal\Core\TypedData\OptionsProviderInterface
17 class AllowedValuesConstraint extends Choice {
19 public $minMessage = 'You must select at least %limit choice.|You must select at least %limit choices.';
20 public $maxMessage = 'You must select at most %limit choice.|You must select at most %limit choices.';