mirror of
https://github.com/Respect/Validation.git
synced 2024-06-04 23:02:16 +02:00
97b243daa1
Although helpful, the changes in the Min, Max, and Length rules made using those rules more verbose. This commit will simplify their use by allowing users to use them as prefixes. Because I was creating prefixes for those rules, I made other cool prefixes. Doing that is scary because it will generate more code to support, and I would have liked to avoid that. However, that's a valuable addition, and it's worth the risk. I might reconsider that in the future, but for now, that looks like a good idea. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
22 lines
429 B
PHP
22 lines
429 B
PHP
<?php
|
|
|
|
/*
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Transformers;
|
|
|
|
final class RuleSpec
|
|
{
|
|
/** @param array<mixed> $arguments */
|
|
public function __construct(
|
|
public readonly string $name,
|
|
public readonly array $arguments = [],
|
|
public readonly ?RuleSpec $wrapper = null,
|
|
) {
|
|
}
|
|
}
|