Home > DeveloperSection > Forums > How to Ennable RequiredFieldValidator With Javascript?
Kamlakar Singh
Kamlakar Singh

Total Post:28

Posted on    October-20-2014 11:32 PM

 JavaScript JQuery  Validation 

 1 Reply(s)
 888  View(s)
Rate this:

function Validation() 


 if (document.Form1.txtfrom2.value.length > 0)

 ValidatorEnable(Rftxtfrom2, true); 

 ValidatorEnable(Rftxtjd2, true); 

 ValidatorEnable(Rftxtflno2, true); 

 ValidatorEnable(Rftxtdep2, true); 



i need to txtfrom2 text box contain 1 charecter 4 RequiredFieldValidator automaticaly ennable true  


Alex Leblois
Alex Leblois

Total Post:67

Posted on    October-20-2014 11:33 PM

Use below

function Validation() 
 if (document.Form1.txtfrom2.value.length > 0)
 ValidatorEnable(document.getElementById(Rftxtfrom2), true);
ValidatorEnable(document.getElementById(Rftxtjd2), true);
ValidatorEnable(document.getElementById(Rftxtflno2), true);
ValidatorEnable(document.getElementById(Rftxtdep2), true);

Don't want to miss updates? Please click the below button!

Follow MindStick