Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / validator / Constraints / CardScheme.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator\Constraints;
13
14 use Symfony\Component\Validator\Constraint;
15
16 /**
17  * Metadata for the CardSchemeValidator.
18  *
19  * @Annotation
20  * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
21  *
22  * @author Tim Nagel <t.nagel@infinite.net.au>
23  * @author Bernhard Schussek <bschussek@gmail.com>
24  */
25 class CardScheme extends Constraint
26 {
27     const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e';
28     const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed';
29
30     protected static $errorNames = array(
31         self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR',
32         self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR',
33     );
34
35     public $message = 'Unsupported card type or invalid card number.';
36     public $schemes;
37
38     public function getDefaultOption()
39     {
40         return 'schemes';
41     }
42
43     public function getRequiredOptions()
44     {
45         return array('schemes');
46     }
47 }