ValidationMessageTagHelper Class

Definition

ITagHelper implementation targeting <span> elements with an asp-validation-for attribute.

public ref class ValidationMessageTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("span", Attributes="asp-validation-for")]
public class ValidationMessageTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement("span", Attributes="asp-validation-for")>]
type ValidationMessageTagHelper = class
    inherit TagHelper
Public Class ValidationMessageTagHelper
Inherits TagHelper
Inheritance
ValidationMessageTagHelper
Attributes

Constructors

ValidationMessageTagHelper(IHtmlGenerator)

Creates a new ValidationMessageTagHelper.

Properties

For

Gets an expression to be evaluated against the current model.

Generator

Gets the IHtmlGenerator used to generate the ValidationMessageTagHelper's output.

Order

When a set of ITagHelpers are executed, their Init(TagHelperContext)'s are first invoked in the specified Order; then their ProcessAsync(TagHelperContext, TagHelperOutput)'s are invoked in the specified Order. Lower values are executed first.

ViewContext

Gets the ViewContext of the executing view.

Methods

Init(TagHelperContext)

Initializes the ITagHelper with the given context. Additions to Items should be done within this method to ensure they're added prior to executing the children.

(Inherited from TagHelper)
Process(TagHelperContext, TagHelperOutput)

Synchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)
ProcessAsync(TagHelperContext, TagHelperOutput)

Asynchronously executes the TagHelper with the given context and output.

Applies to