jquery form validation plugin need help?
- by python
</tr>
for ($i = 0; $i < $dm_numrec; $i++) {
?>
<tr>
<td width="266" height="28" valign="top">
<input type="text" name="recommend_to_name<?php echo $i;?>" />
</td>
<td height="28" valign="top">
<input type="text" name="recommend_to_email<?php echo $i;?> />"
</td>
</tr>
I used jquery form validation plugin
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
<script src="jquery.min.js"></script>
<script src="jquery.validate.min.js"></script>
<script>
$(document).ready(function(){
$('#recommend').validate({
'rules':{
'recommend_to_name':'required',
'recommend_to_email':{
'required':true,
'email':true
},
}
});
});
</script>
How can I validate for the recommend_to_name that its name is a dynamic string from loop:
recommend_to_name0
recommend_to_name1
recommend_to_name2
recommend_to_name..