ValidationAttribute.ErrorMessageString Property
Silverlight
Gets the localized or non-localized error message.
Namespace: System.ComponentModel.DataAnnotations
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | Both ErrorMessageResourceName and ErrorMessage are set. -or- Neither ErrorMessageResourceName nor ErrorMessage is set. -or- Either ErrorMessageResourceName or ErrorMessageResourceType is set, but the other is not. |
If you set the ErrorMessageResourceName and ErrorMessageResourceType properties, the ErrorMessageString property contains the localized error message. If you set the ErrorMessage property, ErrorMessageString contains the non-localized error message.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Community Additions
ADD
Show: