title: Email validation not working in angularjs?
body: <p>this is my input</p>
  
  <pre><code>aby-saturn@gmail.com
  </code></pre>
  
  <p>hyphen is not working in emailid getting invalid email id
  this is my ng-pattern</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;div class="input-group"&gt;
          &lt;span class="input-group-addon"&gt;&lt;i class="glyphicon glyphicon-envelope"&gt;&lt;/i&gt;&lt;/span&gt;
          &lt;input class="form-control" type="email" id="email" name="email" placeholder="Enter Email" ng-model="user.email" ng-pattern="/^[_a-z0-9]+(\.[_a-z0-9]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/" noncapitalize required /&gt;
      &lt;/div&gt;
      &lt;div style="color: red" id="emailError"&gt;&lt;/div&gt;
      &lt;span style="color:red;" class="email-error" ng-show="loginForm.submitted &amp;&amp; loginForm.email.$error.required"&gt;Required&lt;/span&gt;
      &lt;span style="color:red" class="error" ng-show="loginForm.submitted &amp;&amp; loginForm.email.$error.pattern"&gt;Email not valid&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>