RemoteAttributeBase.AddValidation(ClientModelValidationContext) 方法

定义

将非侵入式验证 HTML 属性添加到 ClientModelValidationContext

public:
 virtual void AddValidation(Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ClientModelValidationContext ^ context);
public virtual void AddValidation (Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context);
abstract member AddValidation : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext -> unit
override this.AddValidation : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext -> unit
Public Overridable Sub AddValidation (context As ClientModelValidationContext)

参数

context
ClientModelValidationContext

ClientModelValidationContext 添加非引人注目的验证 HTML 属性。

实现

注解

调用 的GetUrl(ClientModelValidationContext)派生ValidationAttribute实现。

适用于