Question

I am using jQuery validation on my form and I would like to be able to disable the submit button and change its class, when the form validates. I know I could bind a function on the key up event but I want to know if this is possible from within the jQuery validate framework. I tried doing what this guy suggested, but got nowhere.

I am using jQuery Validate

Was it helpful?

Solution

It appears that you may be able to get this to work automatically within the options on the Validate plugin itself.

Check out this link on the jQuery docs for more information.

$("myForm").validate(
   {
       onkeyup: true, 
       onsubmit: false, 
       onclick: true, 
       onfocusout: true
   }
);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top