ValidationAttribute.ErrorMessage 屬性

定義

取得或設定錯誤訊息,此錯誤訊息會在驗證失敗時與驗證控制項產生關聯。Gets or sets an error message to associate with a validation control if validation fails.

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

屬性值

String

與驗證控制項相關聯的錯誤訊息。The error message that is associated with the validation control.

備註

這個屬性是與驗證控制項相關聯的錯誤訊息。This property is the error message that you associate with the validation control. 它會用於非當地語系化的錯誤訊息。It is used for non-localized error messages.

適用於