共用方式為


RequiredAttributeAdapter.GetErrorMessage(ModelValidationContextBase) 方法

定義

取得錯誤訊息。

public:
 override System::String ^ GetErrorMessage(Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ModelValidationContextBase ^ validationContext);
public override string GetErrorMessage (Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext);
override this.GetErrorMessage : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase -> string
Public Overrides Function GetErrorMessage (validationContext As ModelValidationContextBase) As String

參數

validationContext
ModelValidationContextBase

要用於建立訊息的內容。

傳回

當地語系化的錯誤訊息。

適用於