Mobile : Custom Validator & Validation message

2 posts, 0 answers
  1. Nilesh
    Nilesh avatar
    9 posts
    Member since:
    Jan 2013

    Posted 23 Jan 2013 Link to this post


    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
  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 25 Jan 2013 Link to this post

    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!
Back to Top