angular form error messages
<p>
<label for="email">Email</label>
<input type="email" ng-model="formModel.email" name="email" required="required"
ng-class="{green: theForm.email.$valid ,
red: !theForm.email.$valid && !theForm.$pristine
}">
<p class="red" ng-show="theForm.email.$error.required && !theForm.$pristine">
email is required
</p>
</p>