Add selectize to invite responsibles

email validation and input as tags is added using selectize
This commit is contained in:
Rahul 2019-07-20 14:28:20 +05:30
parent 58c829571e
commit a20c1bb882

View file

@ -29,4 +29,18 @@
plugins: ['remove_button'], plugins: ['remove_button'],
minItems: 2 minItems: 2
} ) } )
$('#booth_invite_responsible').selectize({
plugins: ['remove_button'],
delimiter: ',',
persist: false,
create: function(input) {
if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(input)){
return {}
}
return {
value: input,
text: input
}
}
} )
}); });