class InvokableValidationRule implements Rule, ValidatorAwareRule (View source)

Traits

Properties

protected Closure $destructor

The callback to call when the object destructs.

from  CreatesPotentiallyTranslatedStrings
protected ValidationRule|InvokableRule $invokable

The invokable that validates the attribute.

protected bool $failed

Indicates if the validation invokable failed.

protected array $messages

The validation error messages.

protected Validator $validator

The current validator.

protected array $data

The data under validation.

Methods

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

Create a pending potentially translated string.

void
__construct(ValidationRule|InvokableRule $invokable)

Create a new explicit Invokable validation rule.

void
__destruct()

Handle the object's destruction.

make(ValidationRule|InvokableRule $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

protected void __construct(ValidationRule|InvokableRule $invokable)

Create a new explicit Invokable validation rule.

Parameters

ValidationRule|InvokableRule $invokable

Return Value

void

void __destruct()

Handle the object's destruction.

Return Value

void

static InvokableValidationRule make(ValidationRule|InvokableRule $invokable)

Create a new implicit or explicit Invokable validation rule.

Parameters

ValidationRule|InvokableRule $invokable

Return Value

InvokableValidationRule

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.