/src/Symfony/Component/Validator/Constraints/Max.php
https://github.com/pust/symfony · PHP · 42 lines · 17 code · 6 blank · 19 comment · 0 complexity · 23b3491a82a7f90b7726032840d1c1ee MD5 · raw file
- <?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
- *
- * @api
- */
- class Max extends Constraint
- {
- public $message = 'This value should be {{ limit }} or less';
- public $invalidMessage = 'This value should be a valid number';
- public $limit;
- /**
- * {@inheritDoc}
- */
- public function getDefaultOption()
- {
- return 'limit';
- }
- /**
- * {@inheritDoc}
- */
- public function getRequiredOptions()
- {
- return array('limit');
- }
- }