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

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

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.

Thanks
May 16, 2007 at 2: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.

Regards,

Dave

_________________________________

David Hayden
Microsoft MVP C#