I have a Select2 Box, with tagging enabled to add new own tags. Selecting an existing option works without any problem (of any length). But some code prevents me from adding a new option longer than 2 characters long (just can't add more characters). See the JSFiddle
<select class="form-control select2" multiple="multiple" id="employee-groups-select" name="employee[employee_group_ids][]">
<option value="4">Text1</option>
<option value="1">Text2</option>
<option value="3">Text3</option>
<option value="2">Text4</option>
</select>
jQuery code to initialize the select2
$('#employee-groups-select').select2({
theme: 'bootstrap4',
tags: true,
width: '100%',
tokenSeparators: [',', ' '],
});
Help is highly appreciated. I have no idea where to look.
But some code prevents me from adding a new option longer than 2 characters long
– Aurangzeb