enforce autocomplete whitelist in team leaders form

pull/6469/head
Thibault Duplessis 2020-04-24 09:15:21 -06:00
parent 9a987dd635
commit 95703e82dd
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,10 @@
$(() => {
const tagify = new Tagify(document.getElementById('form3-leaders'), {
const input = document.getElementById('form3-leaders');
const tagify = new Tagify(input, {
pattern: /.{3,}/,
maxTags: 30
maxTags: 30,
enforceWhitelist: true,
whitelist: input.value.trim().split(/\s*,\s*/)
});
let abortCtrl; // for aborting the call
tagify.on('input', e => {