CustomValidationAttribute.FormatErrorMessage(String) 方法

定義

格式化驗證錯誤訊息。

public:
 override System::String ^ FormatErrorMessage(System::String ^ name);
public override string FormatErrorMessage (string name);
override this.FormatErrorMessage : string -> string
Public Overrides Function FormatErrorMessage (name As String) As String

參數

name
String

要包含在格式化訊息中的名稱。

傳回

格式化之錯誤訊息的執行個體。

例外狀況

目前的屬性格式不正確。

備註

錯誤訊息會在運行時間格式化,以包含 name 傳遞給這個方法的值。

適用於