UniqueEntity.php 767 B

12345678910111213141516171819202122232425262728293031
  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\Bridge\Doctrine\Validator;
  11. use Symfony\Component\Validator\Constraint;
  12. use Symfony\Component\Validator\ConstraintValidator;
  13. use Symfony\Component\Validator\Exception\UnexpectedTypeException;
  14. class UniqueEntity extends \Symfony\Component\Validator\Constraint
  15. {
  16. public $message = 'This value is already used.';
  17. public $entityManagerName = false;
  18. public $fields = array();
  19. /**
  20. * {@inheritDoc}
  21. */
  22. public function getTargets()
  23. {
  24. return self::CLASS_CONSTRAINT;
  25. }
  26. }