Ng-message Is Not Showing
I am new to AngularJS. I am trying to validate my form using ng-pattern. I want only numbers in my field and when user types any characters or special characters, i want it to thro
Solution 1:
Your inputs are inside ng-form directive, therefore validations erros related to that input(or any inputs inside that ng-form directive), can bee accessed through that ng-form.
So, simply change your ng-messages to be:
<divng-messages="step1form.name1.$error"><divng-message="pattern">This field is invalid</div></div>Solution 2:
ng-message is not supported in AngularJS 1.2.x .
It was introduced in AngularJS 1.3 .
Post a Comment for "Ng-message Is Not Showing"