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

Mobile : Custom Validator & Validation message

1 Answer 146 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Nilesh
Top achievements
Rank 1
Nilesh asked on 24 Jan 2013, 05:55 AM
Hello,

I am using Kendo UI mobile and have developed a custom validator. I have also developed a simple form with 2 input controls & push button. The validator that I have developed is applied declaratively to these 2 controls.

When I click on the button and inside the button click handler, when I call 'validate' on validator object. When data entered in both input controls is invalid. I see validation messages for both input boxes displayed INSIDE the first input box. So essentially 1 validation message is written on top of the other.

I have 2 questions :
1. The error message being displayed inside the TEXTBOX itself, is that by design for the mobile platform ?
2. Why do both error message get overwritten one above the other ? I have attached my validator code for reference.

I can share the complete code if needed. Please let me know.

Best Regards,
Nilesh Padbidri

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 25 Jan 2013, 04:40 PM
Hi Nilesh,

KendoUI Mobile does not provide a 'special' styling for the validation messages. I also believe that the problem you described is not related to the custom validation rule. Does it appears with a regular required validation?

I am not sure exactly where the problem comes from because you did not shared the mark-up of your View. As an assumption, the issue might occur if the input is placed inside a ListView component. In that case the framework will wrap the input inside another html element which will cause the validation message to appear over the textbox.

Due to the smaller screen size of the mobile device, displaying the validation message in the 'default for desktops' way is not suitable. My recommendation is to consider displaying the messages outside of the ListView.
This topic explains how to customize the validation message position.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Validation
Asked by
Nilesh
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or