mirror of
https://github.com/Respect/Validation.git
synced 2026-03-22 17:54:41 +01:00
This commit will add a couple of rules that we already use but also introduce new ones and make sure all the code is in accordance with the new coding standards. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
28 lines
615 B
PHP
28 lines
615 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\Rules;
|
|
|
|
use function ctype_xdigit;
|
|
|
|
/**
|
|
* @author Andre Ramaciotti <andre@ramaciotti.com>
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
*/
|
|
class Xdigit extends AbstractFilterRule
|
|
{
|
|
protected function validateFilteredInput(string $input): bool
|
|
{
|
|
return ctype_xdigit($input);
|
|
}
|
|
}
|