I documentation I found example how to add red border to widgets. But it is not working for editor and multiselect.
How can I achieve that?
PS: There is also some strange issue. Textarea doesn't show required message, and multiselect does even if it is not empty. (look attached image)
How can I achieve that?
PS: There is also some strange issue. Textarea doesn't show required message, and multiselect does even if it is not empty. (look attached image)
4 Answers, 1 is accepted
0
Hi Matjaz,
The default Kendo UI Validator behavior is to apply a k-invalid CSS class to the element, which holds the value. There are two reasons why a red border may not appear:
- the value element is not visible, so even if it has a red border, you will not see it
- the value element has no k-input class, so your CSS selector will be ignored
Also, the validation will not work properly if there is no name attribute set for the element, which is validated. This is explicitly stated in the documentation:
http://docs.telerik.com/kendo-ui/framework/validator/overview#error-messages
On the other hand, the default Kendo UI Validator behavior is to add the validator message as a sibling to the value element. This may not be appropriate in all scenarios, that's why you have the ability to define a custom validation message placeholder:
http://demos.telerik.com/kendo-ui/validator/index
(see Amount)
http://docs.telerik.com/kendo-ui/framework/validator/overview#customizing-the-tooltip-position
Regards,
Dimo
Telerik
The default Kendo UI Validator behavior is to apply a k-invalid CSS class to the element, which holds the value. There are two reasons why a red border may not appear:
- the value element is not visible, so even if it has a red border, you will not see it
- the value element has no k-input class, so your CSS selector will be ignored
Also, the validation will not work properly if there is no name attribute set for the element, which is validated. This is explicitly stated in the documentation:
http://docs.telerik.com/kendo-ui/framework/validator/overview#error-messages
On the other hand, the default Kendo UI Validator behavior is to add the validator message as a sibling to the value element. This may not be appropriate in all scenarios, that's why you have the ability to define a custom validation message placeholder:
http://demos.telerik.com/kendo-ui/validator/index
(see Amount)
http://docs.telerik.com/kendo-ui/framework/validator/overview#customizing-the-tooltip-position
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Milan
Top achievements
Rank 1
answered on 08 Jan 2018, 01:06 PM
In the following case: http://dojo.telerik.com/OMutEW/2 select which is used as base for multiselect has name attribute, and still doesn't have red border.
As Dimo has described: "the value element is not visible, so even if it has a red border, you will not see it" this is the case with mentioned multiselect in dojo sample above.
Does that mean it's never possible to add red border to multiselect since it's input element is never visible? If that's the case, don't you consider this behavior as faulty and buggy? If not, do you know what else could be the problem with the simple dojo sample?
0
Hello Milan,
You should address the stlying regarding the k-textbox class. Please find the modified dojo example below:
https://dojo.telerik.com/IWiHOp/6
Regards,
Nencho
Progress Telerik
You should address the stlying regarding the k-textbox class. Please find the modified dojo example below:
https://dojo.telerik.com/IWiHOp/6
Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
Hello Milan,
You should address the stlying regarding the k-textbox class. Please find the modified dojo example below:
https://dojo.telerik.com/IWiHOp/6
Regards,
Nencho
Progress Telerik
You should address the stlying regarding the k-textbox class. Please find the modified dojo example below:
https://dojo.telerik.com/IWiHOp/6
Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.