Share via


Entity.ValidateProperty Method (ValidationContext, Object)

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Indicates whether the specified property value is valid for the specified validation context.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
Protected Overridable Sub ValidateProperty ( _
    validationContext As ValidationContext, _
    value As Object _
)
'Usage
Dim validationContext As ValidationContext
Dim value As Object

Me.ValidateProperty(validationContext, _
    value)
protected virtual void ValidateProperty(
    ValidationContext validationContext,
    Object value
)
protected:
virtual void ValidateProperty(
    ValidationContext^ validationContext, 
    Object^ value
)
abstract ValidateProperty : 
        validationContext:ValidationContext * 
        value:Object -> unit 
override ValidateProperty : 
        validationContext:ValidationContext * 
        value:Object -> unit 
protected function ValidateProperty(
    validationContext : ValidationContext, 
    value : Object
)

Parameters

  • value
    Type: System.Object
    The value to test. It may be nulla null reference (Nothing in Visual Basic) if nulla null reference (Nothing in Visual Basic) is valid for the given property.

Remarks

This method evaluates all of the ValidationAttribute objects associated with the property indicated as the MemberName, and throws a ValidationException for the first ValidationAttribute that signals a validation error.

See Also

Reference

Entity Class

ValidateProperty Overload

System.ServiceModel.DomainServices.Client Namespace