Choice.php 882 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Validator\Constraints;
  11. class Choice extends \Symfony\Component\Validator\Constraint
  12. {
  13. public $choices;
  14. public $callback;
  15. public $multiple = false;
  16. public $min = null;
  17. public $max = null;
  18. public $message = 'The value you selected is not a valid choice';
  19. public $multipleMessage = 'One or more of the given values is invalid';
  20. public $minMessage = 'You must select at least {{ limit }} choices';
  21. public $maxMessage = 'You must select at most {{ limit }} choices';
  22. /**
  23. * {@inheritDoc}
  24. */
  25. public function getDefaultOption()
  26. {
  27. return 'choices';
  28. }
  29. }