I want to validate that atleast one checkbox is selected. The checkboxes are added dynamicly so the exact ID's are unknown. All i know is that they start with the same ID name e.g. "Sameid_xxx", "Sameid_xx1" ,"Sameid_xx2" etc..
here is what i have:
$cbx_group = $('input[Id^="Sameid"]');
$cbx_group.prop('required', true);
if ($cbx_group.is(":checked")) {
$cbx_group.prop('required', false);
}
the problem here is that this makes all checkboxes required. I also dont have form validator