JQuery basic form post
<p>I am validating a form but when the validation is not passed it still posts the form.  How do I prevent the this?</p>

<pre><code>&lt;form action="/Account/Registration" method="get"&gt;
           &lt;fieldset id="enterCode"&gt;
                &lt;ul&gt;
                    &lt;li class="inputBlock"&gt;
                        &lt;input type="text" id="Code" name="Code" value=""&gt;

                    &lt;/li&gt;
                &lt;/ul&gt;

            &lt;/fieldset&gt;
            &lt;div class="submitBlock"&gt;
                &lt;input type="submit" value="Send" class="button" onclick="validate();" /&gt;
            &lt;/div&gt;
        &lt;/form&gt;

        &lt;script type="text/javascript"&gt;
            function validate() {

                var val = $('#Code').val();

                if (val == "") {
                    alert("Please enter code");
                }

                return false;


                }

        &lt;/script&gt;
</code></pre>
