1
I have the following field for e-mail:
<input type="email" class="form-control" id="email" name="email" ng-model="fields.email" required="true" />
In the div where the field is, I have the following validation:
ng-class="{ 'has-error': userForm.email.$error.email }"
It turns out that if you type "abc@abc" is given as valid, but as we can see is wrong.
I have tried using regular expression but without success. How to validate emails correctly in Angularjs?
I just made a modification, as the business rule is all within the . js, created a variable within the scope and added the regular expression there, worked perfectly with this.
– Filipe Moraes