DivisibleBy.php 818 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Validator\Constraints;
  11. /**
  12. * @Annotation
  13. * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  14. *
  15. * @author Colin O'Dell <colinodell@gmail.com>
  16. */
  17. #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
  18. class DivisibleBy extends AbstractComparison
  19. {
  20. public const NOT_DIVISIBLE_BY = '6d99d6c3-1464-4ccf-bdc7-14d083cf455c';
  21. protected static $errorNames = [
  22. self::NOT_DIVISIBLE_BY => 'NOT_DIVISIBLE_BY',
  23. ];
  24. public $message = 'This value should be a multiple of {{ compared_value }}.';
  25. }