Kendo validator js syntax error using checkbox within template editor

4 posts, 0 answers
  1. Ryan
    Ryan avatar
    5 posts
    Member since:
    Feb 2009

    Posted 12 Mar 2013 Link to this post

    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?

  2. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 13 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Martin Vesely
    Martin Vesely avatar
    10 posts
    Member since:
    May 2009

    Posted 13 Jun 2013 Link to this post

    I have exact the same problem with Kendo 2013.1.514. Was it really fixed in this release?
  5. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 14 Jun 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready