you can get the forms id, which is submitted with event.currentTarget.id
$("form").submit(function( event ) {
var empty_fields = [];
$("#" + event.currentTarget.id + " .chck").each(function(){
if($(this).val().length !=0 ) {
return;
}else{
empty_fields.push($(this).attr('name'))
$(this).css('border','2px solid red');
event.preventDefault();}
})
if(empty_fields){
alert("The required field "+empty_fields+" is missing")
}
});