Multiple Forms for validation

Jul 6, 2012 at 12:47 PM

Hello,

 

I have multiple forms and using the validator to validate the form. If I validate one form, it goes on validating other forms as well, which I dont want. Could you help me in this case?

 

Thanks,

VijayKumar Dogra

Coordinator
Jul 8, 2012 at 12:57 AM

Sure the idea is that you give the validate attribute a unique name to group the fields you do want validated together like below:

<div>
  <input type="text" validate="form1" require="Please enter name" />
  <input type="submit" value="Submit" onclick="return validate('form1');" />
</div>


<div>
  <input type="text" validate="form2" require="Please enter name" />
  <input type="submit" value="Submit" onclick="return validate('form2');" />
</div>

Thanks for the feedback, I'll look at updating the example in the download to make this more clear.

Jul 9, 2012 at 7:52 AM

Thanks, that worked perfectly!!!

Also, thanks for sharing this awesome validator