HasMinlength
API reference › HTML › Form › Mixin › HasMinlength
Used by 7 types
Provides an immutable API for the minlength attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/minlength.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
minlength() | Sets the minlength attribute. | HasMinlength |
Method details
Section titled “Method details”minlength()
Section titled “minlength() ”public function minlength(int|string|Stringable|UnitEnum|null $value): staticSets the minlength attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | int|Stringable|UnitEnum| | Minimum length. Must be ’>= 0’, or null to remove the attribute. |
Returns
static: New instance with the updated minlength attribute.
Throws
InvalidArgumentException: if the value is not an integer-like value ’>= 0’.