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

[Solved] Unobtrusive validation not working as expected on ComboBox

5 Answers 274 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Karan Misra
Top achievements
Rank 1
Karan Misra asked on 13 Aug 2011, 10:50 AM
Hello,

I see that the data-val="true" and other attributed are rendered for the second 'input' control. However, the 'input-validation-error' is not being added properly.

There fore, the Combo Box is not displaying the familiar pink hume of error. This is also replicated on the demo pages (ComboBox > Client Side Validation.)

Is this the intended behavior?

Regards,
Karan Misra

5 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 15 Aug 2011, 10:12 AM
Hello Karan Misra,

 
The input-validation-error is actually applied to the visible input. Check this screencast for more information. There is no defined "input-validation-error" CSS class in the demo and that is why it so not colored in red. This functionality is not supported in Chrome, because this browser does not implement DOMAttributedChanged event.

Regards,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items 

0
Karan Misra
Top achievements
Rank 1
answered on 15 Aug 2011, 10:59 AM
Thanks for the tip Georgi.

It is indeed adding the CSS class in Firefox.

In Chrome, could we implement a timer to watch the hidden input tags and update the visible input tag based on changes? As a work around...
0
Accepted
Georgi Krustev
Telerik team
answered on 15 Aug 2011, 11:42 AM
Hello Karan,

 
I will forward your feature request to our developers for further investigation and consideration. We will determine whether to implement it depending on the users interest.

Regards,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Grant Drury-Green
Top achievements
Rank 1
answered on 08 Jul 2012, 05:23 AM
I notice in the referenced demo (in the screencast) - if you load the page, and immediately click "Save" - no validation error is reported - even tho there is no selected product. It's only fired if you have tried to type something in the drop down.

It seems to me that there's a problem with load on demand and initial validation.

Is this a known issue and is there any workaround?
0
Georgi Krustev
Telerik team
answered on 12 Jul 2012, 07:29 AM
Hello Grant Drury-Green,

 
This is expected, because the validated input (the one which holds the selected value) is rendered with value. The value in the demo is "1". That is why the validation passes. You can overcome this if you not set the value of the ComboBox component.

All the best,
Georgi Krustev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
ComboBox
Asked by
Karan Misra
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Karan Misra
Top achievements
Rank 1
Grant Drury-Green
Top achievements
Rank 1
Share this question
or