 <p>In this case yes indeed the <code>return false</code> is returning from the <code>switch</code> and not the entire function. What you wan to do is create a flag variable and when you want to return from the function after the switch, check the flag:</p> <pre><code>function EmptyFieldCheck( .. ) { var returnFlag = false; switch (category) { case 'Hardware': if(..) { ... returnFlag = true; } break; ... } if(returnFlag) return false; /* Other posting code here */ } </code></pre>