I am using bootstrap 3.3.7
, jQuery 3.1.1
and jQuery-UI 1.12.0
for a form to ask for email and some other details.
For using autocomplete
I am using the example shows under
https://jqueryui.com/autocomplete/#multiple
Email looks like this
<div class='form-group row'>
<label class='col-md-2 control-label'>To....</label>
<div class='col-md-6'>
<input type='email' class='form-control inputMail' name='mailTo' required multiple>
</div>
</div>
As you can see, input is type email
and I would like to validate the input.
My problem is the last comma, this input will not be accepted.
Invalid input:
But when I remove the last comma by hand it works.
Valid input:
Have anyone a solution how it works without removing the last comma by hand?