Skip to content
PHP Ecosystem
Explore

HasMinlength

API reference › HTML › Form › Mixin › HasMinlength

traitUIAwesome\Html\Form\Mixin\HasMinlength
Uses traitsHasIntLikeAttribute
Sourcesrc/Form/Mixin/HasMinlength.php
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.

MethodDescriptionDefined by
minlength()Sets the minlength attribute.HasMinlength
public function minlength(int|string|Stringable|UnitEnum|null $value): static

Sets the minlength attribute.

Parameters

ParameterTypeDescription
$valueint|string|Stringable|UnitEnum|nullMinimum length. Must be ’>= 0’, or null to remove the attribute.

Returns

static: New instance with the updated minlength attribute.

Throws