trait HasErrorBag

Trait HasErrorBag.

Provides utilities to check for validation errors on component properties.

Methods

array{__bt_wireModel: string|null, __bt_finalError: string|null, __bt_hasError: bool}
getErrorState(string|null $error = null, ComponentAttributeBag|null $attributes = null, MessageBag|null $errors = null)

Retrieve the error state for a given attribute or context.

Details

at line 21
array{__bt_wireModel: string|null, __bt_finalError: string|null, __bt_hasError: bool} getErrorState(string|null $error = null, ComponentAttributeBag|null $attributes = null, MessageBag|null $errors = null)

Retrieve the error state for a given attribute or context.

Parameters

string|null $error

Direct error message.

ComponentAttributeBag|null $attributes

Component attributes.

MessageBag|null $errors

Global errors.

Return Value

array{__bt_wireModel: string|null, __bt_finalError: string|null, __bt_hasError: bool}