4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Constraints;
14 use Symfony\Component\Validator\Constraint;
15 use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
19 * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
21 * @author Bernhard Schussek <bschussek@gmail.com>
23 class Valid extends Constraint
25 public $traverse = true;
27 public function __construct($options = null)
29 if (is_array($options) && array_key_exists('groups', $options)) {
30 throw new ConstraintDefinitionException(sprintf(
31 'The option "groups" is not supported by the constraint %s',
36 parent::__construct($options);