ValidationAttribute.ErrorMessageString 属性

定义

获取本地化的验证错误消息。Gets the localized validation error message.

protected:
 property System::String ^ ErrorMessageString { System::String ^ get(); };
protected string ErrorMessageString { get; }
member this.ErrorMessageString : string
Protected ReadOnly Property ErrorMessageString As String

属性值

String

本地化的验证错误消息。The localized validation error message.

注解

通过计算 ErrorMessage 属性或通过计算和属性来获取错误消息字符串 ErrorMessageResourceType ErrorMessageResourceNameThe error message string is obtained by evaluating the ErrorMessage property or by evaluating the ErrorMessageResourceType and ErrorMessageResourceName properties. 这两种情况是互相排斥的。The two cases are mutually exclusive. 如果要显示本地化的错误消息,则使用第二种情况。The second case is used if you want to display a localized error message.

适用于