HtmlHelper.GenerateValidationMessage Method

Definition

Generate a validation message.

protected:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateValidationMessage(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::String ^ message, System::String ^ tag, System::Object ^ htmlAttributes);
protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateValidationMessage (Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string message, string tag, object htmlAttributes);
abstract member GenerateValidationMessage : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.GenerateValidationMessage : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Protected Overridable Function GenerateValidationMessage (modelExplorer As ModelExplorer, expression As String, message As String, tag As String, htmlAttributes As Object) As IHtmlContent

Parameters

modelExplorer
ModelExplorer

The ModelExplorer.

expression
String

The expression.

message
String

The validation message.

tag
String

The tag.

htmlAttributes
Object

An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

The IHtmlContent.

Applies to