NelsonF posted on Thursday, June 29, 2006
I need to make a validation rule for an object that compares it's data to other members of the collection it's in. For example, I have a collection of users, each has an groupid and an email property.
I need to insure that the groupid + email value is unique. I can do this as a constraint on the sql server, but all I get is a nice exception after I try to save instead of a warning message in the broken rules collection. Is there anyway to do this with the CSLA framework?
The RuleArgs doesn't seem to contain any reference to the collection the object belongs to so I'm not sure how I can iterate through the collection inside of a rule.