Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / validator / Constraints / Isbn.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  * @Annotation
18  * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
19  *
20  * @author The Whole Life To Learn <thewholelifetolearn@gmail.com>
21  * @author Manuel Reinhard <manu@sprain.ch>
22  * @author Bernhard Schussek <bschussek@gmail.com>
23  */
24 class Isbn extends Constraint
25 {
26     const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45';
27     const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a';
28     const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339';
29     const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640';
30     const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1';
31
32     protected static $errorNames = array(
33         self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR',
34         self::TOO_LONG_ERROR => 'TOO_LONG_ERROR',
35         self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR',
36         self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR',
37         self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR',
38     );
39
40     public $isbn10Message = 'This value is not a valid ISBN-10.';
41     public $isbn13Message = 'This value is not a valid ISBN-13.';
42     public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.';
43     public $type;
44     public $message;
45
46     /**
47      * {@inheritdoc}
48      */
49     public function getDefaultOption()
50     {
51         return 'type';
52     }
53 }