validator bug?

3 posts, 0 answers
  1. Matt
    Matt avatar
    1 posts
    Member since:
    Jul 2012

    Posted 01 Jul 2012 Link to this post

    I can't get MVC 3 model validation to work using the Kendo validator. I get a "syntax error, unrecognized expression" thrown from kendo.aspnet.mvc.js.

    I can get it to work if I change line 432, which is the 'locate' function of the mvcLocator message locator. I added single quotes around the fieldname.

    return element.find(".field-validation-valid[data-valmsg-for='" + fieldName + "'], .field-validation-error[data-valmsg-for='" + fieldName + "']");<br> 

    Is this a bug?
  2. Rosen
    Rosen avatar
    3253 posts

    Posted 02 Jul 2012 Link to this post

    Hello Matt,

    What is the version of KendoUI for ASP.NET MVC you are using? Are you able to observe this behavior using the latest Kendo UI Q2 2012 BETA as it contains a fix for similar issue.

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Matt
    Matt avatar
    1 posts
    Member since:
    Jul 2012

    Posted 03 Jul 2012 Link to this post

    I've downloaded the new version and that seems to be okay now, thanks - I only seemed to be able to reproduce it at the time using the minified javascript file. I am however having other problems with client side validation. I think it's an issue with the MVC wrappers. Validation attributes are not being added to any Kendo controls within an Editor Template. The same holds true for the old MVC extensions, however standard HtmlHelpers work fine. I added a separate support request for this as it's a fairly core piece of functionality and a deal breaker as I can't use client validation on any complex forms/view models.
Back to Top