Aracılığıyla paylaş


DefaultValidationHtmlAttributeProvider.AddValidationAttributes Yöntem

Tanım

İstemci doğrulaması etkinse öğesine attributes doğrulamayla ilgili HTML öznitelikleri ekler.

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

Parametreler

viewContext
ViewContext

ViewContext Geçerli kapsam için bir örnek.

modelExplorer
ModelExplorer

ModelExplorer bir ifade için.

attributes
IDictionary<String,String>

Dictionary<TKey,TValue> doğrulama özniteliklerini almak için. Doğrulama özniteliği adlarını değerleriyle String eşler. Değerler bir HTML belgesine veya yanıtına yazılmadan önce HTML kodlanmış olmalıdır.

Şunlara uygulanır