<?php
for ($i=0; $i < $total_vehicles; $i++) {
$id=$edtVehicle[$i]->id;
$chasis=$edtVehicle[$i]->chasis;
?>
// HTML内容 ”novs [] []“ 想用jQuery验证来验证它如何验证NAME =“novs [78] []使用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
}
?>
jQuery验证
$("#add_user_form").validate({
"novs[]":{ required:true, },
messages: { "novs[]":{ required : "Please fill this value" }, }
});
你的jQuery在哪里? – JustBaron
$( “#add_user_form”)来验证({ “novs []”:{ 需要:真, }, 消息:{ “novs []”:{ 必需的: “请填写该值” }, } –
更新你的问题 – JustBaron