Multiple checkbox validation in jquery

Today, We want to share with you multiple checkbox validation in jquery.In this post we will show you jquery validate checkbox at least one, hear for How to validate a form with multiple checkboxes to have atleast one checked we will give you demo and example for implement.In this post, we will learn about multiple checkbox validations in javascript with an example.

jQuery Validation with Multiple Checkboxes

Example 1: index.html

<!DOCTYPE html>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
    $(function () {
        $("#btnSubmit").click(function () {
            var checked = $("#tblFruits input[type=checkbox]:checked").length;
            var isValid = checked > 0;
            $("#spnError")[0].style.display = isValid ? "none" : "block";

<table id = "tblFruits" border="0" cellpadding="0" cellspacing="0">
        <td><input type="checkbox" value="1" /></td>
        <td><input type="checkbox" value="2" /></td>
        <td><input type="checkbox" value="3" /></td>
        <td><input type="checkbox" value="4" /></td>
        <td><input type="checkbox" value="5" /></td>
<br />
<span id="spnError" class="error" style="display: none">Please select at-least one Fruit.</span>
<br />
<input type="button" value="Submit" id = "btnSubmit" />


I hope you get an idea about jquery multiselect dropdown with checkbox validation.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Also Read This 👉   automatic image slider in html - How To Create a Slideshow?