class AnyOf implements Rule, ValidatorAwareRule

Properties

protected array $rules

The rules to match against.

protected Validator|null $validator

The validator performing the validation.

Methods

__construct(array $rules)

Sets the validation rules to match against.

bool
passes(string $attribute, mixed $value)

Determine if the validation rule passes.

array|string
message()

Get the validation error messages.

setValidator(Validator $validator)

Set the current validator.

Details

at line 28
__construct(array $rules)

Sets the validation rules to match against.

Parameters

array $rules

at line 36
bool passes(string $attribute, mixed $value)

Determine if the validation rule passes.

Parameters

string $attribute
mixed $value

Return Value

bool

at line 57
array|string message()

Get the validation error messages.

Return Value

array|string

at line 69
ValidatorAwareRule setValidator(Validator $validator)

Set the current validator.

Parameters

Validator $validator

Return Value

ValidatorAwareRule