You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
If the actual generated HTML is <span ... />, everything is behaving as expected. The error message isn't visible because the self-closing element has no body.
We've had a few discussions related to this experience and aspnet/Tooling#398 remains open. But the onus today is on .cshtml authors; they must not write a normal HTML element as self-closing.
Side note: aspnet/Tooling#398 is about the opposite problem: VS does not warn when users write a void element with an end tag e.g. <input ...></input>.
I think Razor View is missing some usefule method:
//get every error message of Model's propertypublicIEnumerable<string>GetModelErrorsFor(Action<model>action)// get single error message of Model's property , sometimes i want show only one errorpublicstringGetFirstModelErrorFor(Action<model>action)// get validation-summarypublicIEnumerable<string>GetModeErrors(ValidationSummaryoptions)// and also DisplayNameFor
those method work like HtmlHelpers or TagHelpers , but they only return pure string rather than full HTML mark; So we can use them in any cases!
danroth27
changed the title
TagHelper [asp-validation-for] doesn't work on server sider ?
TagHelper [asp-validation-for] doesn't work on server side
Jul 14, 2016
This is the code i write:
And this is the code that Generated:
The text was updated successfully, but these errors were encountered: