Freigeben über


DefaultHtmlGenerator.AddValidationAttributes Methode

Definition

Fügt Validierungsattribute hinzu, wenn die tagBuilder Clientvalidierung aktiviert ist.

protected:
 virtual void AddValidationAttributes(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ tagBuilder, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression);
protected virtual void AddValidationAttributes (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression);
abstract member AddValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
override this.AddValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
Protected Overridable Sub AddValidationAttributes (viewContext As ViewContext, tagBuilder As TagBuilder, modelExplorer As ModelExplorer, expression As String)

Parameter

viewContext
ViewContext

Ein ViewContext instance für den aktuellen Bereich.

tagBuilder
TagBuilder

Eine TagBuilder-Instanz.

modelExplorer
ModelExplorer

Der ModelExplorer für den expression.

expression
String

Ausdrucksname relativ zum aktuellen Modell.

Gilt für: