EvenException.php 722 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
  4. * SPDX-License-Identifier: MIT
  5. */
  6. declare(strict_types=1);
  7. namespace Respect\Validation\Exceptions;
  8. /**
  9. * Exceptions to be thrown by the Even Rule.
  10. *
  11. * @author Henrique Moody <henriquemoody@gmail.com>
  12. * @author Jean Pimentel <jeanfap@gmail.com>
  13. * @author Paul Karikari <paulkarikari1@gmail.com>
  14. */
  15. final class EvenException extends ValidationException
  16. {
  17. /**
  18. * {@inheritDoc}
  19. */
  20. protected $defaultTemplates = [
  21. self::MODE_DEFAULT => [
  22. self::STANDARD => '{{name}} 必须是偶数',
  23. ],
  24. self::MODE_NEGATIVE => [
  25. self::STANDARD => '{{name}} 不能是偶数',
  26. ],
  27. ];
  28. }