Several input names

Verifying a post form, if I have an input name the following code works perfectly: user clicking the submit, if submit_name is blank it will change the border color

if(jQuery(“#submit_name”).val()==“”) {
jQuery(“#submit_name”).css(‘border-color’,‘red’);
return false;
}

How can I do it if there are several input form names?
<input type=“name” id=“submit_name1”>
<input type=“name” id=“submit_name2”>
<input type=“name” id=“submit_name3”>

<input type=“name” id=“submit_name15”>

Is there any similar thing with a for cycle?
Like

for ($i=1; $i++; $i < 16){
if(jQuery(“#submit_name[$i]”).val()==“”) {
jQuery(“#submit_name[$i]”).css(‘border-color’,‘red’);
return false;
}

Thanks!!!