I follow some tutorial for validate input array,
name="surname[]"
This work perfectly, but if I have a input like this (with php variables)
name="surname[<?=id?>][<?=number?>][]"
It don't work.
you can use like this --
<select multiple required class="form-control" name="martial_arts[]">
OR
<input type="text" name="surname[]" />
in validate method use this --
rules: {
'martial_arts[]': {
required: true,
}
}
OR
rules: {
'surname[]': {
required: true,
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.