Compartir a través de


DefaultHtmlGenerator.AddValidationAttributes Método

Definición

Agrega atributos de validación al tagBuilder si la validación de cliente está habilitada.

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)

Parámetros

viewContext
ViewContext

Instancia ViewContext del ámbito actual.

tagBuilder
TagBuilder

Instancia de TagBuilder.

modelExplorer
ModelExplorer

ModelExplorer para expression.

expression
String

Nombre de expresión, en relación con el modelo actual.

Se aplica a