general ice
New Member
With .NET Framework 4.5, the \[code\]ValidationAttribute\[/code\] class now has a new \[code\]Boolean\[/code\] property named \[code\]RequiresValidationContext\[/code\].I have been digging for long time now and I couldn't find what this property is there for. The difault value for this is false and I initially thought that if this is set to false, the below method is called:\[code\]public virtual bool IsValid(object value)\[/code\]If it is set to true, then the below one is called:\[code\]protected virtual ValidationResult IsValid(object value, ValidationContext validationContext);\[/code\]It turns out that no matter what you set, the \[code\]IsValid\[/code\] method which returns \[code\]ValidationResult\[/code\] is always called.For the love of God, what is this \[code\]RequiresValidationContext\[/code\] property for?