Skip to content
PHP Ecosystem
Explore

HasAutocorrect

API reference › HTML Attribute › Global › HasAutocorrect

traitUIAwesome\Html\Attribute\Global\HasAutocorrect
Sourcesrc/Global/HasAutocorrect.php
Used by 1 type

Provides an immutable API for the HTML autocorrect attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect.

MethodDescriptionDefined by
autocorrect()Sets the autocorrect attribute.HasAutocorrect
public function autocorrect(string|UnitEnum|null $value): static

Sets the autocorrect attribute.

Parameters

ParameterTypeDescription
$valuestring|UnitEnum|nullAutocorrect behavior (‘on’ or ‘off’), or null to remove the attribute.

Returns

static: New instance with the updated autocorrect attribute. Autocorrect for predefined enum values.

Throws