mirror of
https://github.com/Respect/Validation.git
synced 2026-03-18 08:09:51 +01:00
I'm not a native English speaker, and the same goes for many contributors from this library. Because of that, some messages just don't sound very good, so I updated a lot of them.
28 lines
589 B
PHP
28 lines
589 B
PHP
<?php
|
|
|
|
/*
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
use Respect\Validation\Helpers\CanValidateIterable;
|
|
use Respect\Validation\Message\Template;
|
|
use Respect\Validation\Rules\Core\Simple;
|
|
|
|
#[Template(
|
|
'{{name}} must be an iterable value',
|
|
'{{name}} must not be an iterable value',
|
|
)]
|
|
final class IterableVal extends Simple
|
|
{
|
|
use CanValidateIterable;
|
|
|
|
protected function isValid(mixed $input): bool
|
|
{
|
|
return $this->isIterable($input);
|
|
}
|
|
}
|