2010/10/1 Phil <[email protected]> > However, suppose I perform validation directly against the Foo.Bars > property - ValidatorEngine.Validate(Bar.Foos) - the members in the > collection are not validated. I consider this behaviour to be > incorrect. Why should the validity of an object depend on the context > in which it is being validated? >
It is not supposed to work as you described here. You should do: - validate the Bar: ValidatorEngine.Validate(Bar) --- Each foo will be validated... and every property on Bar. - validate the property: ValidatorEngine.Validate(Bar, b => b.Foos) or ValidatorEngine.Validate(Bar, "Foos")... each foo will be validated, and skip others properties in Bar -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
