ValidationAttribute.ErrorMessage 屬性

定義

若驗證失敗,會接收或設定錯誤訊息以關聯驗證控制項。

public:
 property System::String ^ ErrorMessage { System::String ^ get(); void set(System::String ^ value); };
public string ErrorMessage { get; set; }
member this.ErrorMessage : string with get, set
Public Property ErrorMessage As String

屬性值

與驗證控制相關聯的錯誤訊息。

備註

這個屬性就是你與驗證控制項相關的錯誤訊息。 它用於非本地化錯誤訊息。

適用於