共用方式為


RemoteAttributeBase.AddValidation(ClientModelValidationContext) 方法

定義

將 Unobtrusive 驗證 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 ,將 Unobtrusive 驗證 HTML 屬性新增至 。

實作

備註

呼叫 的衍生實作 ValidationAttributeGetUrl(ClientModelValidationContext)

適用於