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

Kendo Widgets and jQuery Validator

3 Answers 179 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Mark Dawson
Top achievements
Rank 1
Mark Dawson asked on 16 May 2012, 11:51 AM
Hi,

When adding validation markup to an input and using the input as a Kendo Widget, for example a dropdownlist, the input is hidden in favour of the kendo UI elements.

The problem is that jQuery validation then doesn't work as it ignores any hidden inputs.

Is there any way to force Kendo to keep the input visible but move it off screen so that validation will still work?

Thanks,
Mark.

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 May 2012, 10:12 AM
Hello Mark,

There isn't a way to make the input visible through the configuration but you can use custom code to achieve this after the DropDownList is initialized. A much simpler approach to enable the jQuery validation on the DropDownList, is to override the validator default settings e.g.
$.validator.setDefaults({ ignore: '' });   

Kind regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mark Dawson
Top achievements
Rank 1
answered on 21 May 2012, 11:30 AM
Hi Daniel,

Setting the validator defaults isn't an option. I have a number of dynamic forms that show controls based on if the form is in edit or create mode. Changing the default even just for the form containing the dropdown would cause even more problems.

As Kendo has a goal of working with 3rd party frameworks I think this is something that should be addressed. I'd also be happy to use the Kendo Validator if it had any real capabilities such as events to make it extendable (I'm thinking popup tooltips, changing classes on valid/invalid (to work with bootstrap), etc).

Regards,
Mark.
0
Daniel
Telerik team
answered on 24 May 2012, 08:06 AM
Hello again Mark,

There aren't plans to change the DropDownList rendering to support this scenario.
Another option in your case would be to apply custom class to the input elements and set the validator ignore option accordingly.

Kind regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Integration with other JS libraries
Asked by
Mark Dawson
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Mark Dawson
Top achievements
Rank 1
Share this question
or