respect-validation/library/Exceptions/TldException.php
paul karikari 8573d5f064
Apply contribution guidelines to "Tld"
Also check if input is scalar before validation.

Signed-off-by: Paul Karikari <paulkarikari1@gmail.com>
Co-Authored-By: Henrique Moody <henriquemoody@gmail.com>
2018-06-15 22:12:17 +02:00

38 lines
964 B
PHP

<?php
/*
* This file is part of Respect/Validation.
*
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
*
* For the full copyright and license information, please view the "LICENSE.md"
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Respect\Validation\Exceptions;
/**
* Exceptions thrown by Tld Rule.
*
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
* @author Henrique Moody <henriquemoody@gmail.com>
* @author nickl- <github@jigsoft.co.za>
* @author Paul Karikari <paulkarikari1@gmail.com>
*/
final class TldException extends ValidationException
{
/**
* {@inheritdoc}
*/
public static $defaultTemplates = [
self::MODE_DEFAULT => [
self::STANDARD => '{{name}} must be a valid top-level domain name',
],
self::MODE_NEGATIVE => [
self::STANDARD => '{{name}} must not be a valid top-level domain name',
],
];
}