HasPattern
API reference › HTML › Form › Mixin › HasPattern
Used by 6 types
Provides an immutable API for the pattern attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/pattern.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
pattern() | Sets the pattern attribute. | HasPattern |
Method details
Section titled “Method details”pattern()
Section titled “pattern() ”public function pattern(string|Stringable|UnitEnum|null $value): staticSets the pattern attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Pattern value, or null to remove the attribute. |
Returns
static: New instance with the updated pattern attribute.