I have the following HTML code with AngularJS:
<html ng-app>
//...
<form name="myForm2">
<input type="email" id="email" name="email" ng-model="formData.email" required/>
<span ng-show="!myForm2.email.$error.required && myForm2.email.$error.email && myForm2.email.$dirty">invalid email {{formData.email}}</span>
</form>
//...
</html>
What I want is, if the user fills in the wrong email field, the message "invalid email value_pregnancy_no_field" appears.
It happens that the above code only returns the message "invalid email", I am not able to capture the value of the field.
What's wrong with the code above?