Triggering client-side validation manually

N

Nathan Sokalski

I have written a Validator (a class that inherits from the BaseValidator
class), and it includes client-side validation functions. The validator is a
conditional validator that only validates if a specified checkbox,
radiobutton, dropdownlist item, etc. is checked or selected. The only
feature I have left to add is to hide the error message if they uncheck or
unselect the checkbox or radiobutton by use of the onchange eventhandler. Is
there any way to call the client-side validation that is called when you
attempt to submit for just the one validator? When looking through the
generated code, I saw the following:

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
}

Which I am assuming is what gets called when the page is submitted, but that
obviously means it validates everything, and if it is the only thing I can
use to validate, what do I do with it? Or is there some other way to execute
the validation? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top