ValidationAttribute.ErrorMessageResourceName 属性

定义

获取或设置错误消息资源的名称,在验证失败的情况下,要使用该名称来查找 ErrorMessageResourceType 属性值。Gets or sets the error message resource name to use in order to look up the ErrorMessageResourceType property value if validation fails.

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

属性值

String

与验证控件关联的错误消息资源。The error message resource that is associated with a validation control.

注解

ErrorMessageResourceName 属性与属性结合使用,以便 ErrorMessageResourceType 提供本地化的错误消息。You use the ErrorMessageResourceName property together with the ErrorMessageResourceType property in order to provide a localized error message.

适用于