final class DelegatedCheck

A validation check that delegates to an existing validate*() method or Rule object.

Used for rules that cannot be inlined: cross-field references, DB rules, implicit rules, custom Rule objects, Exists/Unique objects, etc.

Methods

__construct(string $ruleName, array $parameters, object|null $ruleObject = null, mixed $originalRule = null)

No description

string
getRuleName()

Get the rule name for addFailure() error message lookup.

Details

at line 26
__construct(string $ruleName, array $parameters, object|null $ruleObject = null, mixed $originalRule = null)

No description

Parameters

string $ruleName

Parsed rule name (e.g., 'Exists', 'Required'). Empty for Rule objects dispatched via validateUsingCustomRule().

array $parameters

parsed rule parameters

object|null $ruleObject

The original rule object (RuleContract, Exists, Unique, etc.). Typed as object (not RuleContract) because Exists/Unique implement Stringable, not RuleContract.

mixed $originalRule

The raw rule as it appears in the exploded rules array. Set as $this->currentRule before dispatch so validateExists/ validateUnique can check $this->currentRule instanceof Exists.

at line 37
string getRuleName()

Get the rule name for addFailure() error message lookup.

Return Value

string