Issue with validation plug-in add rule method

Issue with validation plug-in add rule method

Hello,

I am using the latest of all  JQuery plugins  required  for doing validation...

When using the  $("#myinput").rule("add",  aRule) method for defining my rules ; I am getting the following error: c.data(d.form, "validator") is undefined when executing the $("#myform").validate();  when I use $("#formid").validate(rules) it works fine.

My controls are wrapped with a form tag.
This is the code:

  1. Rule #1
  2. $("#_firstName_id").rules("add", { required: true, messages : { required: "Enter First Name (required)" } }) ;
  3. Rule#2
  4. $("#_lastName_id").rules("add", { required: true, messages : { required: "Enter Last Name (required)" } }) ;
  5. Validation commnad
  6.  $("#fc_org_pragmatikroo_mhrd_domain_Employees_form").validate();
  Thank you very much in advance
   jD