Validation Child classes

Topics: Validation Application Block
Aug 12, 2009 at 1:55 AM
Edited Aug 12, 2009 at 2:11 AM


I using the validation block, I trying to validate a object which contains another object and another object and so on... Some validation seems to be not firing. I using the config to validate it. What could I've done wrong?

Aug 12, 2009 at 9:17 AM


If you are using the objectvalidator on the child object of your class. Please verify that if your validation type dont have a default Rule, specify a TargetRuleSet on the ObjectValidator. For instance if you have a "Class1" and "Class2", in your config you have defined validation for the type "Class2", On the "Class1" when you add the ObjectValidator (for the "Class2" type) specify a TargetRuleSet if the "Class2" validation rule dont have a defaultRuleSet. Please check my suggestion if it helps.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.

Aug 12, 2009 at 4:33 PM

Thank you for the explanation. That solved my problem. Thanks again.