Closed mkArtakMSFT closed 3 years ago
Issue moved from dotnet/aspnetcore#35903
From @mkArtakMSFT on Monday, August 30, 2021 4:49:23 PM
Thanks for contacting us. ASP.NET MVC 5 is in maintenance mode and we make only critical bug fixes on it.
Thanks for contacting us. We're not making any improvements in this area any more as this project is in maintenance mode. Only critical blocking issue with wide impact and security issues are considered. This one doesn't seem as critical given that we haven't received many reports from customers.
Issue moved from dotnet/aspnetcore#35903
From @HoomanBahreini on Sunday, August 29, 2021 5:57:00 AM
I believe this is a bug, with ASP.NET MVC 5, I am not sure where should I report MVC 5 bugs? I have not tested this with .NET core.
I have created a custom Validation attribute, to check PhoneNumbers:
I annotate my model:
And in myView:
Everything works as expected, as demonstrated in this fiddle
Here is the problem
And I cannot demonstrate the issue in the fiddle.
If I put the input inside _MyPartialView, and call it from MyView as shown below:
@Html.Partial("path/_MyPartialView", Model)
Then the
ValidationMessage
does not show under the input box as shown in the snippet below:This problem only happen when:
I got this error with both .NET Framework 4.6.1 and 4.7.2. Here is my ASP.NET MVC version: