ValidatorEnable

Came across this today when working around some JavaScript validation. I essentially needed to force some required fields under certain circumstances and not others.
I desperately looked around to find a way to disable a validator. Eventually I came across this, which was a big help….didn’t think it would be this simple:

  1. function doSomething()
  2. {
  3. var rfvRegion = document.getElementById(‘rfvRegion’);
  4. ValidatorEnable(rfvRegion, false);
  5. }

This works in .NET 2.0 and above.

Leave a Reply