I am attempting to display a message like this for my input named "txtEmail":
<span ng-show="frm.txtEmail.$error.email">Email is wrong!</span>
This is within a partial, with the HTML container containing a form named "frm".
However, it seems that it is not working as expected, only functioning properly if the form is inside the partial.
I am utilizing AngularJS in an ASP .Net MVC project.
Update:
I do not have custom validation and I have tried using $invalid instead.
When I run the application, I can see the complete HTML with the "frm" form but the functionality does not work as intended.
Interestingly, when I place it inside a dummy form:
<form name="foo">
<span ng-show="foo.txtEmail.$error.email">Email is wrong!</span>
. . . it works.