Observation:
System.Web.Webpages.Html.HtmlHelper.ValidationMessage(string, string) does not return the error message specified in the second parameter when it is used with jquery.validate.unobtrusive.js
Expectation:
It should return the custom error message.
Repro step:
1. Create a Web Site
2. Select the ASP.NET Web Site (Razor v2) template, and click OK.
3. Open Login.cshtml in thye Account folder.
4. Update the ValidationMessage method call for email as follows:
@Html.ValidationMessage("email", "Error!")
5. Open the page in IE.
6. Hit the login button, you won't see the message, Error!.
7. Remove the following line in the Login.cshtml file. :
<script src="~/scripts/jquery.validate.unobtrusive.min.js"></script>
8. Open the page in IE.
9. Hit the login button, you will see the message, Error!.
System.Web.Webpages.Html.HtmlHelper.ValidationMessage(string, string) does not return the error message specified in the second parameter when it is used with jquery.validate.unobtrusive.js
Expectation:
It should return the custom error message.
Repro step:
1. Create a Web Site
2. Select the ASP.NET Web Site (Razor v2) template, and click OK.
3. Open Login.cshtml in thye Account folder.
4. Update the ValidationMessage method call for email as follows:
@Html.ValidationMessage("email", "Error!")
5. Open the page in IE.
6. Hit the login button, you won't see the message, Error!.
7. Remove the following line in the Login.cshtml file. :
<script src="~/scripts/jquery.validate.unobtrusive.min.js"></script>
8. Open the page in IE.
9. Hit the login button, you will see the message, Error!.