This is a migrated thread and some comments may be shown as answers.

TypeError with Validator

3 Answers 742 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Daniel Plomp
Top achievements
Rank 2
Daniel Plomp asked on 21 Mar 2013, 01:19 PM
Hi support,

I'm using the Kendo Framework Validator together with Siteifnity.
I'm getting this error when running my page:

Timestamp: 21-3-2013 14:18:05
Error: TypeError: $(...).kendoValidator is not a function
Line: 909
This is the code I use in my page:
$(document).ready(function () {
 
       $('#addReview').hide();
 
       var validator = $("#addReview").kendoValidator().data("kendoValidator");
       //status = $(".status");
 
       $("<%=submit.ClientID %>").click(function () {
           if (validator.validate()) {
               status.text("Hooray! Your tickets has been booked!")
                   .removeClass("invalid")
                   .addClass("valid");
           } else {
               status.text("Oops! There is invalid data in the form.")
                   .removeClass("valid")
                   .addClass("invalid");
           }
       });
 
   });
Any thoughts?

Kind regards,
Daniel

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 25 Mar 2013, 08:33 AM
Hi Daniel,

Thank you for getting in touch with us.
This topic explains where the problem comes from and what is the solution.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel Plomp
Top achievements
Rank 2
answered on 26 Mar 2013, 09:05 AM
Hi Alexander,

Thanks for your reply.
I checked the article, but I'm sure jQuery is loaded once and Kendo is loaded after jQuery.

Strange thing is that the validation seems to work okay. Just getting this javascript error on my pages, which causes any other script to stop running.

Daniel
0
Alexander Valchev
Telerik team
answered on 26 Mar 2013, 02:49 PM
Hello Daniel,

Could you please provide a small example that isolates the issue? In this way I would be able to examine what exactly is going wrong and assist you further.
Thank you in advance for the cooperation.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Validation
Asked by
Daniel Plomp
Top achievements
Rank 2
Answers by
Alexander Valchev
Telerik team
Daniel Plomp
Top achievements
Rank 2
Share this question
or