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

validator bug?

2 Answers 220 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 01 Jul 2012, 07:45 PM
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 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 02 Jul 2012, 08:11 AM
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.

Regards,
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
Matt
Top achievements
Rank 1
answered on 03 Jul 2012, 02:35 PM
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.
Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Matt
Top achievements
Rank 1
Share this question
or