Placing error message for a checkbox array
Posted
by
eddy
on Stack Overflow
See other posts from Stack Overflow
or by eddy
Published on 2010-12-25T22:51:35Z
Indexed on
2010/12/25
22:54 UTC
Read the original article
Hit count: 213
jQuery
|jquery-validate
Hello all. I am using the Validation Plugin for jQuery and it works wonders. Except when I have a group of checkboxes...the error messages will display right after the first checkbox...like so:
<tbody>
<c:forEach items="${list}" var="item">
<tr>
<td align="center">
<input type="checkbox" name="selectItems" value="<c:out value="${item.numberPlate}"/>" />
</td>
<!--some other columns-->
</tr>
</c:forEach>
</tbody>
I found that I can use a wrapper for these checkboxes ,then place the error message there, but I have no idea how to do it since I'm creating the rows dynamically.
Hope you can help me out.
© Stack Overflow or respective owner