无法调用未定义的方法'call'

时间:2013-09-13 15:34:40

标签: jquery

我在我的MVC网站上使用jQuery-validation来检查反馈表单,我写了这段代码

$(function () {
        $("#feedback-form").validate({
            submitHandler: function (form) {
                form.submit();
            },
            rules: {
                Name: {
                    required: true,
                    minlength: 2
                },
                Email: {
                    required: true,
                    email: true
                },
                Phone: {
                    required: true,
                    number: true
                },
                Company: {
                    required: true
                },
                ProjectInformation: {
                    extension: "doc|docx|txt|pdf"
                }
            },
            messages: {
                Name: {
                    required: "@Resources.Global.Feedback_Error_Name_Empty",
                    minlength: "@Resources.Global.Feedback_Error_Name_Short"
                },
                Email: {
                    required: "@Resources.Global.Feedback_Error_Email_Empty",
                    email: "@Resources.Global.Feedback_Error_Email_Valid"
                },
                Phone: {
                    required: "@Resources.Global.Feedback_Error_Phone_Empty",
                    number: "@Resources.Global.Feedback_Error_Phone_Valid"
                },
                Company: {
                    required: "@Resources.Global.Feedback_Error_Company_Empty"
                }
            }
        });
    });

但是当我尝试发送例如空表单时,我没有收到任何错误消息 我在控制台中收到错误

Uncaught TypeError: Cannot call method 'call' of undefined   

enter image description here

我使用jquery-2.0.3.min.jsjQuery Validation Plugin - v1.11.1
怎么了?如何解决?

0 个答案:

没有答案