PrintableException.php 1017 B

1234567891011121314151617181920212223242526272829303132333435
  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 Printable Rule.
  10. *
  11. * @author Alexandre Gomes Gaigalas <alganet@gmail.com>
  12. * @author Andre Ramaciotti <andre@ramaciotti.com>
  13. * @author Emmerson Siqueira <emmersonsiqueira@gmail.com>
  14. * @author Henrique Moody <henriquemoody@gmail.com>
  15. */
  16. final class PrintableException extends FilteredValidationException
  17. {
  18. /**
  19. * {@inheritDoc}
  20. */
  21. protected $defaultTemplates = [
  22. self::MODE_DEFAULT => [
  23. self::STANDARD => '{{name}} 只能包含可打印字符',
  24. self::EXTRA => '{{name}} 只能包含可打印字符和 "{{additionalChars}}"',
  25. ],
  26. self::MODE_NEGATIVE => [
  27. self::STANDARD => '{{name}} 不能包含可打印字符',
  28. self::EXTRA => '{{name}} 不能包含可打印字符或 "{{additionalChars}}"',
  29. ],
  30. ];
  31. }