51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Symfony package.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Symfony\Component\Validator\Constraints;
|
|
|
|
use Symfony\Component\Validator\Constraint;
|
|
|
|
/**
|
|
* @Annotation
|
|
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
|
*
|
|
* @author The Whole Life To Learn <thewholelifetolearn@gmail.com>
|
|
* @author Manuel Reinhard <manu@sprain.ch>
|
|
*/
|
|
class Isbn extends Constraint
|
|
{
|
|
public $isbn10Message = 'This value is not a valid ISBN-10.';
|
|
public $isbn13Message = 'This value is not a valid ISBN-13.';
|
|
public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.';
|
|
public $type;
|
|
public $message;
|
|
|
|
/**
|
|
* @deprecated Deprecated since version 2.5, to be removed in 3.0. Use option "type" instead.
|
|
* @var bool
|
|
*/
|
|
public $isbn10 = false;
|
|
|
|
/**
|
|
* @deprecated Deprecated since version 2.5, to be removed in 3.0. Use option "type" instead.
|
|
* @var bool
|
|
*/
|
|
public $isbn13 = false;
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getDefaultOption()
|
|
{
|
|
return 'type';
|
|
}
|
|
}
|