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;
18 * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
20 * @author Fabien Potencier <fabien@symfony.com>
21 * @author Bernhard Schussek <bschussek@gmail.com>
23 class Expression extends Constraint
25 const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284';
27 protected static $errorNames = array(
28 self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR',
31 public $message = 'This value is not valid.';
37 public function getDefaultOption()
45 public function getRequiredOptions()
47 return array('expression');
53 public function getTargets()
55 return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT);
61 public function validatedBy()
63 return 'validator.expression';