1$(document).ready(function() {
2 $('#form1').submit(function() {
3 if ($('input:checkbox', this).length == $('input:checked', this).length ) {
4 // everything's fine...
5 } else {
6 alert('Please tick all checkboxes!');
7 return false;
8 }
9 });
10});
11