This documentation is archived and is not being maintained.
ValidationAttribute.ErrorMessageResourceName Property
Visual Studio 2008
Gets or sets the error message resource name to use as lookup for the ErrorMessageResourceType if a validation fails.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | If the ValidationAttribute is already in explicit mode or if you set the property multiple times. |
| ArgumentException | If the value of error message is null. |
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: