我使用Angular JS中的foloowing库:
https://github.com/ghiden/angucomplete-alt
如何验证电子邮件类型的自动填充输入?如果显示错误无效?
我尝试使用field-required="true"
,但ID未在电子邮件中验证:
<angucomplete-alt
placeholder="<%= t('projects.project_full.invitation.enter_email_title') %>"
pause="100"
id="ex8b"
selected-object="selectedInvitationUsers"
local-data="invitable_users"
search-fields="fullname,email"
title-field="fullname,email"
minlength="1"
input-name="invite.email"
override-suggestions="true"
input-changed="inputChangeHandler"
field-required="true"
input-class="form-control form-control-small"/>
</div>
答案 0 :(得分:1)
将元素指令更改为属性样式,例如:
<div angucomplete-alt
placeholder="<%= t('projects.project_full.invitation.enter_email_title') %>"
pause="100"
id="ex8b"
selected-object="selectedInvitationUsers"
local-data="invitable_users"
search-fields="fullname,email"
title-field="fullname,email"
minlength="1"
input-name="invite.email"
override-suggestions="true"
input-changed="inputChangeHandler"
field-required="true"
input-class="form-control form-control-small"/>
</div>