ValidationAttribute.ErrorMessageResourceType 属性

定义

获取或设置在验证失败的情况下用于查找错误消息的资源类型。Gets or sets the resource type to use for error-message lookup if validation fails.

public:
 property Type ^ ErrorMessageResourceType { Type ^ get(); void set(Type ^ value); };
public Type ErrorMessageResourceType { get; set; }
public Type? ErrorMessageResourceType { get; set; }
member this.ErrorMessageResourceType : Type with get, set
Public Property ErrorMessageResourceType As Type

属性值

Type

与验证控件关联的错误消息的类型。The type of error message that is associated with a validation control.

注解

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

适用于