Bind a function to the submit event for the form like this:
// assuming #foo is the form and each grouped element has classname bar
// also, this assumes that your form is not loaded by AJAX, but only the elements
// contained in it
$('#foo').submit(function() {
var elements = $("input[name='clients[]']");
var validated = false;
elements.each(function() {
if ($(this).val() != '') {
validated = true;
return false; // will break the each
} else {
validated = false;
}
});
return validated;
});
Live example here.