class InvokableValidationRule implements Rule, ValidatorAwareRule

Traits

Properties

protected Closure $destructor

The callback to call when the object destructs.

from  CreatesPotentiallyTranslatedStrings
protected bool $failed

Indicates if the validation invokable failed.

protected array $messages

The validation error messages.

protected Validator|null $validator

The current validator.

protected array $data

The data under validation.

Methods

pendingPotentiallyTranslatedString(string $attribute, string|null $message)

Create a pending potentially translated string.

__construct(InvokableRule|ValidationRule $invokable)

Create a new explicit Invokable validation rule.

__destruct()

Handle the object's destruction.

make(InvokableRule|ValidationRule $invokable)

Create a new implicit or explicit Invokable validation rule.

Details

protected PotentiallyTranslatedString pendingPotentiallyTranslatedString(string $attribute, string|null $message)

Create a pending potentially translated string.

Parameters

string $attribute
string|null $message

Return Value

PotentiallyTranslatedString

at line 44
protected __construct(InvokableRule|ValidationRule $invokable)

Create a new explicit Invokable validation rule.

Parameters

InvokableRule|ValidationRule $invokable

the invokable that validates the attribute

__destruct()

Handle the object's destruction.

at line 52
static InvokableValidationRule make(InvokableRule|ValidationRule $invokable)

Create a new implicit or explicit Invokable validation rule.

Parameters

InvokableRule|ValidationRule $invokable

Return Value

InvokableValidationRule