Hi, all..

I'm using Joern's validation plug-in and I'm getting an error message.
The strange thing is, I use the same plug-in on a different page for a different
form and it works perfectly.

Firebug tells me this:  $("#trans_add_form").validate is not a function
(and it also has beneath that: trans_location: {required:  "Please enter the 
transaction location."}

Here's the code. any clues, someone?  Thanks!  Rick

        <script type="text/javascript">

        // $.validator.defaults.debug = true;

        $().ready(function() {

        $("#trans_add_form").validate({
                
        errorPlacement: function(error, element) {
                error.appendTo("#" + element.attr('id') + "_error");
              },

                focusInvalid: "false",
                           event: "keyup",
                        
                        rules: {
                                        trans_name: {required: true},
                                        trans_category: {required: true},
                                        trans_amount: {required: true, 
numerical: true },
                                        trans_tofrom: {required: true },
                                        trans_description: {required: true},
                                        trans_date: {required: true, date: 
true},
                                        trans_time:     {required: true},       
                                        trans_location: {required: true}
                                        },

                        messages: {
                                        trans_name: {required: "Please enter a 
name for the
debit."},
                                        trans_category: {required: "Please 
choose a category for
this transaction."},
                                        trans_amount: {required: "Please enter 
the transaction
amount.", numerical: "Please enter the dollar amount of the transaction."},
                                        trans_tofrom: {required: "Please enter 
who the transaction
amount was to or from."},
                                        trans_description: {required: "Please 
enter a description of
the transaction."},
                                                        trans_date: {required: 
"Please enter the
date of the transaction. (Format: Feb 12, 2007)",
                                                          date: "This entry 
must be a valid date.
(Format: Feb 12, 2007)"},
                                                trans_time:     {required: 
"Please enter a valid
time for the transaction. (Format: 10:00 am)"},
                                        trans_location: {required: "Please 
enter the transaction
location."}
                                        }
                        })
                });
                
</script>

Reply via email to