Sdílet prostřednictvím


DefaultHtmlGenerator.AddValidationAttributes Metoda

Definice

Přidá ověřovací atributy do objektu tagBuilder , pokud je povolené ověření klienta.

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)

Parametry

viewContext
ViewContext

Instance ViewContext pro aktuální obor.

tagBuilder
TagBuilder

Instance TagBuilder .

modelExplorer
ModelExplorer

Hodnota ModelExplorer pro expression.

expression
String

Název výrazu vzhledem k aktuálnímu modelu.

Platí pro