I want to perform validation on input field , when user lefts the field .
My.html
<div ng-form="form" novalidate>
<input type="email" name="userEmail" class="form-control username"
ng-model="login.username" placeholder="Email" required />
<input type="password" name="password" class="form-control password" placeholder="Password" ng-model="login.password" required />
<div class="invalid-message" ng-show="form.userEmail.$dirty && form.userEmail.$invalid">
<span class="invalid-mail" ng-show="form.userEmail.$error.required">Invalid:Tell us
your email.</span>
<span class="invalid-mail" ng-show="form.userEmail.$error.email">Invalid:This is not a valid email.</span>
</div>
</div>
I want to display invalid-message div and span , corresponding to error in email field . Now the code works fine .
But my requirement is to show invalid-message div and span when user finished typing in email.How to perform this your comments are welcome
Please find the fiddle here Validation Demo fiddle