var mode = [];
$("input[name='mode[]']:checked").each(function(i) {
mode.push($(this).val());
})
if(mode.length == 0)
{
alert('Please select mode!')
};