【发布时间】:2015-03-22 11:41:55
【问题描述】:
我想比较电子邮件 ID。
当我在重复电子邮件输入字段中输入电子邮件 ID 时,将进行验证
<form name ="myForm">
Email:<input name="emailid" type="email" ng-model="user.email" ng-required="true"/>
Repeat Email:<input type="email" name="emailRepeat" ng-model="email2" ng-required="true" ng-match="user.email">
<span ng-show="myForm.emailRepeat.$error.match">Emails have to match!</span><br><br>
<input type="submit" id="submit" value="Submit" /> or <input type="button" ng-click="cancelUserAdd()" value ="Cancel"/>.
</form>
【问题讨论】:
标签: angularjs validation compare email-validation