[jQuery] [Validate] Validation doesn't work until after submit button used

[jQuery] [Validate] Validation doesn't work until after submit button used


Hi, all. (especially Jorn)
Anything wrong with this script?
Thanks,
Rick
        $().ready(function() {
            $("#add-announcement-form").validate({
        
            errorPlacement: function(error, element) {
                error.appendTo("#" + element.attr('id') + "_error");
    },
            focusInvalid: "true",
            event: "onsubmit",
            
            rules: {
                title: "required",
                text: "required"
                },
            messages: {
                title: "Please enter title for the announcement.",
                text: "Please enter text for the announcement."
                }
            })
        });