【发布时间】:2017-03-01 10:55:28
【问题描述】:
<?php
for ($i=0; $i < $total_vehicles; $i++) {
$id=$edtVehicle[$i]->id;
$chasis=$edtVehicle[$i]->chasis;
?>
//HTML CONTENT "novs[][]" 想用 jquery 验证来验证它
<div class="controls content contold">
<input type="hidden" name="hid_novs[]" value="<?php echo $id;?>">
<input type="text" name="novs[<?php echo $id;?>][]" id="novs_<?php echo $i;?>" value="<?php echo $chasis;?>">
<button type="button" class="removebtn"><i class="fa fa-times"></i></button>
<span class="span_error"></span>
</div>
<?php
}
?>
查询验证
$("#add_user_form").validate({
"novs[]":{ required:true, },
messages: { "novs[]":{ required : "Please fill this value" }, }
});
【问题讨论】:
-
你的 jQuery 在哪里?
-
$("#add_user_form").validate({ "novs[]":{ required:true, }, messages: { "novs[]":{ required : "请填写此值" }, }
-
更新您的问题
-
寻找
jQuery validate input array。 -
没有任何关联数组验证的例子。
标签: php jquery validation