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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top