asp.net disable/enable validator using Javascript

asp.net, javascript, validation

Solution

I eventually found the best way to do this was to use the following code:

var validatorObject = document.getElementById('<%=ValidHasShippingLocationZip.ClientID%>');
validatorObject.enabled = false;
validatorObject.isvalid = true;
ValidatorUpdateDisplay(validatorObject);

Problem

I have a complex form requiring me to switch specific validators on or off depending on selections made by the user. ValidatorEnable seems to do the job, but it seems that when I call this method it actually fires the validation process as well, without the user actually hitting the submit button. Is that how it works?

Original source