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;
17 * Metadata for the CardSchemeValidator.
20 * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
22 * @author Tim Nagel <t.nagel@infinite.net.au>
23 * @author Bernhard Schussek <bschussek@gmail.com>
25 class CardScheme extends Constraint
27 const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e';
28 const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed';
30 protected static $errorNames = array(
31 self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR',
32 self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR',
35 public $message = 'Unsupported card type or invalid card number.';
38 public function getDefaultOption()
43 public function getRequiredOptions()
45 return array('schemes');