2013-01-20 19:58:21 +01:00
|
|
|
<?php
|
2015-06-08 16:47:14 +02:00
|
|
|
|
2015-06-08 17:09:25 +02:00
|
|
|
/*
|
2023-02-17 05:13:51 +01:00
|
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
|
|
* SPDX-License-Identifier: MIT
|
2015-06-08 17:09:25 +02:00
|
|
|
*/
|
|
|
|
|
2017-11-19 19:01:31 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2013-01-20 19:58:21 +01:00
|
|
|
namespace Respect\Validation\Exceptions;
|
|
|
|
|
2018-05-31 15:35:25 +02:00
|
|
|
/**
|
|
|
|
* Exceptions to be thrown by the Printable Rule.
|
|
|
|
*
|
2023-02-13 05:59:06 +01:00
|
|
|
* @author Alexandre Gomes Gaigalas <alganet@gmail.com>
|
2018-11-25 17:20:02 +01:00
|
|
|
* @author Andre Ramaciotti <andre@ramaciotti.com>
|
2018-05-31 15:35:25 +02:00
|
|
|
* @author Emmerson Siqueira <emmersonsiqueira@gmail.com>
|
|
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
|
|
*/
|
2018-09-06 22:04:52 +02:00
|
|
|
final class PrintableException extends FilteredValidationException
|
2013-01-20 19:58:21 +01:00
|
|
|
{
|
2018-05-31 15:35:25 +02:00
|
|
|
/**
|
2019-04-05 14:33:00 +02:00
|
|
|
* {@inheritDoc}
|
2018-05-31 15:35:25 +02:00
|
|
|
*/
|
2019-05-12 01:30:36 +02:00
|
|
|
protected $defaultTemplates = [
|
2015-10-18 03:44:47 +02:00
|
|
|
self::MODE_DEFAULT => [
|
2013-01-20 19:58:21 +01:00
|
|
|
self::STANDARD => '{{name}} must contain only printable characters',
|
2015-01-08 03:15:35 +01:00
|
|
|
self::EXTRA => '{{name}} must contain only printable characters and "{{additionalChars}}"',
|
2015-10-18 03:44:47 +02:00
|
|
|
],
|
|
|
|
self::MODE_NEGATIVE => [
|
2013-01-20 19:58:21 +01:00
|
|
|
self::STANDARD => '{{name}} must not contain printable characters',
|
2015-01-08 03:15:35 +01:00
|
|
|
self::EXTRA => '{{name}} must not contain printable characters or "{{additionalChars}}"',
|
2015-10-18 03:44:47 +02:00
|
|
|
],
|
|
|
|
];
|
2013-01-20 19:58:21 +01:00
|
|
|
}
|