If I leave all the fields blank, the errors show up as they should.
But if I correctly fill out even just one of them, the form gets
submitted. Why is this happening?

Here's the JS:

<script type="text/javascript">
$(document).ready(function() {
        $("form").validate({
                rules: {
                        email: {
                                required: true,
                                email: true
                        },
                        fname: {
                                required: true,
                                minLength: 2
                        },
                        lname: {
                                required: true,
                                minLength: 2
                        },
                        city: {
                                required: true,
                                minLength: 2
                        },
                        password1: {
                                required: true,
                                minLength: 6
                        },
                        password2: {
                                equalTo: "#password1"
                        }
                },
                messages: {
                        email: "*",
                        fname: "*",
                        lname: "*",
                        city: "*",
                        password1: "*",
                        password2: "*"
                }
        });
});
</script>

The page is visible here: http://whitechocolateent.com/register

Reply via email to