如何验证ng-blur

时间:2016-11-17 11:01:15

标签: angularjs twitter-bootstrap

从ng-blur我写的$ scope.CheckEmail验证请帮我解决这个问题

自举

     <body>
        <div ng-controller="Homecntrl">
          <div class="modal" id="modal1" role="dialog">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-body">
                  <form name="f1" novalidate="" ng-submit="Save(emp)">                 
                    <div class="form-group">
                      <div class="row">
                        <div class="col-sm-4">
                          Enter EmailId
                        </div>
                        <div class="col-sm-8 left-addon">
                          <input type="email" class="form-control" name="Mail" ng-model="Eamil" ng-blur="ChkAvailableEmail()" ng-class="submitted?'ng-dirty':''" required="" />
<span class="Error" ng-show="(f1.Mail.$dirty ||submitted) && f1.Mail.$error.email">Please Enter Your Valied Email</span>
                   <span class="Error">{{valid}}</span>                      
                        </div>
                      </div>
                    </div>
                 </form>
                </div>        
      </body>

0 个答案:

没有答案