Validator.ValidateProperty Method
Determines whether the specified property value is valid and throws a ValidationException if the property is not valid.
Namespace: System.ComponentModel.DataAnnotations
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
Parameters
- value
- Type: System.Object
The value to validate.
- validationContext
- Type: System.ComponentModel.DataAnnotations.ValidationContext
An object that contains information about the validation request.
| Exception | Condition |
|---|---|
| ArgumentException |
MemberName of validationContext is not a valid property. |
| ValidationException |
value is not valid. |
The ValidateProperty method tests each ValidationAttribute attribute that is associated with the property identified by the validationContext parameter.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.