{include file='__formFieldHeader'}
-<input type="text" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="{$field->getValue()}" class="long"{if $field->isAutofocused()} autofocus{/if}{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}>
+<input type="text" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="{$field->getValue()}" class="long"{if $field->isAutofocused()} autofocus{/if}{if $field->isImmutable()} disabled{/if}>
<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/ItemList/Static'], function(UiItemListStatic) {
$invalidItems = [];
foreach ($this->getValue() as $item) {
switch ($this->getSaveValueType()) {
+ case self::SAVE_VALUE_TYPE_ARRAY:
+ // nothing
+ break;
+
case self::SAVE_VALUE_TYPE_CSV:
if (strpos($item, ',') !== false) {
$invalidItems[] = $item;
));
}
}
+ else if ($this->isRequired()) {
+ $this->addValidationError(new FormFieldValidationError('empty'));
+ }
parent::validate();
}