ValidationHtmlAttributeProvider.AddValidationAttributes Metoda

Definice

Přidá atributy HTML související s ověřováním do attributes pole, pokud je povolené ověření klienta.

public:
 abstract void AddValidationAttributes(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ attributes);
public abstract void AddValidationAttributes (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, System.Collections.Generic.IDictionary<string,string> attributes);
abstract member AddValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * System.Collections.Generic.IDictionary<string, string> -> unit
Public MustOverride Sub AddValidationAttributes (viewContext As ViewContext, modelExplorer As ModelExplorer, attributes As IDictionary(Of String, String))

Parametry

viewContext
ViewContext

Instance ViewContext pro aktuální obor.

modelExplorer
ModelExplorer

Výraz ModelExplorer .

attributes
IDictionary<String,String>

Atribut Dictionary<TKey,TValue> ověření obdržíte. Mapuje názvy ověřovacích atributů na jejich String hodnoty. Před zápisem do dokumentu nebo odpovědi HTML musí být hodnoty kódované kódem HTML.

Poznámky

Přidá nic, pokud attributes je ověřování na straně klienta zakázané.

Platí pro