Is there any way to turn off the validation for the particular class

Topics: Validation Application Block
May 16, 2007 at 7:27 AM

I have a checkbox on a form and on checking a field is activated and this field has been validated in side a class. Now if the checkbox is not selected then on submit of the form i don't want that field to be validated.

So is there any way to turning validation off in VAB and please provide me with some solution.

May 16, 2007 at 3:13 PM
I don't quite understand the scenario.

In general, you may want to look at the following 2 options:

- RuleSets: Use one RuleSet when checkbox checked and other when it is not.
- SelfValidation: Within Self-Validation Method only validate field if a condition exists ( Checkbox checked )

Turning off validation is as simple as just not calling the ValidationFacade to do validation.




David Hayden
Microsoft MVP C#