I'm doing email validation with Angular out of box and works like must be.
<input class="form-control" type="email" placeholder="[email protected]"
name="email" ng-model="user.email" required/>
<div class="error-block" ng-if="form.$submitted && form.email.$invalid">
<div ng-if="form.email.$error.required">Enter the Email Address</div>
<div ng-if="form.email.$error.email">Invalid email address.</div>
The problem is that when the user insert a domain with more than 6 characters, Angular complain about it. For instance if I try to use the email [email protected], Angular set the email like Invalid.
But if I set the email [email protected], Angular validate the email without problems.
Do I have some way to extend the regex to more than 6 characters or I need to use ng-pattern ?
Thanks guys