Edit

Share via


ValidationAttribute.ErrorMessageResourceType Property

Definition

Gets or sets the resource type to use for error-message lookup if validation fails.

C#
public Type ErrorMessageResourceType { get; set; }
C#
public Type? ErrorMessageResourceType { get; set; }

Property Value

The type of error message that is associated with a validation control.

Remarks

You use the ErrorMessageResourceType property together with the ErrorMessageResourceName property in order to provide a localized error message.

Applies to

Product Versions
net-9.0 net-9.0