class MatchesAnyOf implements ValidationRule (View source)

Methods

__construct(array $branches)

Create a new rule instance.

void
validate(string $attribute, mixed $value, Closure $fail)

Run the validation rule.

Details

__construct(array $branches)

Create a new rule instance.

Parameters

array $branches

The rules for each branch, keyed under "value".

void validate(string $attribute, mixed $value, Closure $fail)

Run the validation rule.

Parameters

string $attribute
mixed $value
Closure $fail

Return Value

void