php - How to restrict user to enter unique email id by using ng-chnage directive + angularjs -
i want restrict user enter unique email id in form field , in case user enter email exist in database, display message email id exist.
<div class="form-group"> <input name="email" class="form-control" ng-model="reg.email" required ng-change="getunique_id()" type="text"> <span class="errormessage" ng-show="myform.email.$dirty && myform.email.$error.unique">email in use</span> </div>
i totally confuse how getunique_id .... there anyone,who can me this?
any appreciated.thanks in advance
Comments
Post a Comment