<div class="form-group">
<label for="inputAlertEmails" class="col-sm-2 control-label">Alert Emails</label>
<div class="col-sm-8">
<tags-input type="text"
id="inputAlertEmails" ng-model="ctrl.inputAlertEmails"
min-tags="1" max-tags="5"
on-tag-added="ctrl.UpdateAlertEmails()"
on-tag-removed="ctrl.UpdateAlertEmails()"
placeholder="Enter comma separated valid email ID's to get alerts for your service."
uib-tooltip="Please make sure you confirm the subscription sent by AWS on all email ID entered here."
min-length="5" allowed-tags-pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"></tags-input>
</div>
</div>
表单中的上述字段将多个电子邮件ID作为输入。
我想在此处添加验证,无论何时触摸该字段,但没有电子邮件ID,都应在表格中显示“请输入电子邮件ID”旁边显示错误消息。我已将min-tags-input
更改为1
,但未显示错误消息且required
代码无效。