min¶
New in version 12.0.
- min¶
- Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- Type
integer
- Scope
Display
This option allows to define a minimum number of characters for the
<input>
field and adds aminlength
attribute to the field. If at least one character is typed in and the number of characters is less thanmin
, the FormEngine marks the field as invalid, preventing the user to save the element. DataHandler will also take care for server-side validation and reset the value to an empty string, ifmin
is not reached.When using
min
in combination with max, one has to make sure, themin
value is less than or equalmax
. Otherwise the option is ignored.Empty fields are not validated. If one needs to have non-empty values, it is recommended to use
required => true
in combination withmin
.