This is a migrated thread and some comments may be shown as answers.
Q3 2011 jquery validation problems
2 Answers 102 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Teseo
Top achievements
Rank 1
Teseo asked on 21 Nov 2011, 03:32 PM
Hello,
I upgraded my solution to the latest release (2011.3.1115).
The included jQuery Validation Plugin is the same as the one in the Q2 release (jquery.validate.min.js 1.8.0) and so i kept my jquery.validate.unobtrusive.js (taken from here) which was fully working, but the unobtrusive validation seems to be broken.

I tried to upgrade the jQuery validation plugin to v 1.9.0 and the validation seems to be ok except for ComboBox and DropDownList. For example, an editor template DropDownList binded to an int property not nullable, which used to render with a required attribute, is no more firing the associated ValidationMessageFor.

Is it a Telerik issue? or an issue of the jQuery Validation Plugin? or the unobtrusive validation?

Any help is really appreciated, thanks in advance.






2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 21 Nov 2011, 03:47 PM
Hello Teseo,

 
jQuery validate 1.9 introduces ignore property, which excludes the hidden input. As you probably knows, the combobox and the dropdownlist persist the value of the selected item in an hidden input. Here is a code snippet showing how to clear the ignore property:

$("#formID").data("validator").settings.ignore = ""

Regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Teseo
Top achievements
Rank 1
answered on 21 Nov 2011, 04:27 PM
Thanks for the quick reply, now it's working!

Instead of clearing the ignore property in every form (which would have been a long work), I fixed it by setting the ignore-option to "[]" (as suggested in the 1.9.0 release notes)
Tags
General Discussions
Asked by
Teseo
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Teseo
Top achievements
Rank 1
Share this question
or