Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery validate add rules dynamically

You need to call .validate() before you can add rules this way, like this:

$("#myForm").validate(); //sets up the validator
$("input[id*=Hours]").rules("add", "required");
 
PREVIOUS NEXT
Tagged: #jquery #validate #add #rules #dynamically
ADD COMMENT
Topic
Name
8+5 =