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

Kendo validator js syntax error using checkbox within template editor

3 Answers 96 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 12 Mar 2013, 10:44 PM
I'm using MVC4 with KendoUI 2012.3.1114
I have a model like this...
class Contact {
    Phone WorkPhone {get;set;}
    Phone HomePhone {get;set;}
}
 
class Phone {
    string PhoneNumber {get;set;}
    bool IsPrimary {get;set;}
}
The contact view is using an editor template to display the phones:
@Html.EditorFor(m=>m.WorkPhone)
@Html.EditorFor(m=>m.HomePhone)
and in the Phone editor template, I have a checkbox...
@Html.TextBoxFor(m => m.PhoneNumber)
@Html.CheckBoxFor(m => m.IsPrimary)
everything works fine... until I add a kendo validator...
$("#formId).kendoValidator().data("kendoValidator");
Now when I check/uncheck the checkbox and click away (to trigger blur), I get a js error:

Webpage error details

Message: Syntax error, unrecognized expression: input:hidden[name=WorkPhone.IsPrimary]
Line: 2
Char: 59140
Code: 0
URI: .../Scripts/kendo/2012.3.1114/jquery.min.js

Is there fix for this?

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 13 Mar 2013, 08:53 AM
Hi Ryan, 

We were able to identify the cause for such error and to address it. The fix will be available with the Q1 2013 KendoUI release (scheduled for the second half of the March). Meanwhile, I have updated your telerik points.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jana Vichtova
Top achievements
Rank 1
answered on 13 Jun 2013, 07:09 AM
I have exact the same problem with Kendo 2013.1.514. Was it really fixed in this release?
0
Rosen
Telerik team
answered on 14 Jun 2013, 08:22 AM
Hello Martin,

I cannot recreate the behavior in question locally. Could you please provide a small sample in which it can be observed.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Validation
Asked by
Ryan
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jana Vichtova
Top achievements
Rank 1
Share this question
or