Utilizing ng-messages
to show error messages for form validation in my application.
I have a multi-language app, how can I implement ng-messages
to support multiple languages?
HTML Form
<div class="messages" ng-messages="myForm.email.$error">
<div ng-messages-include="messages.html"></div>
</div>
messages.html
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<p ng-message="required">This field is required</p>
<p ng-message="minlength">This field is too short</p>
<p ng-message="maxlength">This field is too long</p>
<p ng-message="required">This field is required</p>
<p ng-message="email">This needs to be a valid email</p>
P.S.: Utilizing angular 1.4.6