Month: January 2015

Back in 2010, Jeff Hanley published a sample of a ConditionallyRequiredAttribute that used a name of another property for runtime condition verification. The original source can be found at http://jeffhandley.com/archive/2010/09/26/RiaServicesCustomReusableValidators.aspx. I took the liberty to update it to support lambda expressions, allowing for more complex rules, e.g. [ConditionallyRequired(typeof(YourClass), “(x) => { return x.Prop1 == 5…