Validators for mobile

8 posts, 0 answers
  1. Jolien
    Jolien avatar
    6 posts
    Member since:
    Jun 2012

    Posted 11 Jun 2012 Link to this post

    Hi,

    Is the validator functionality available for the mobile version too? All the examples are subject to web development and I can't get it working inside my mobile application. 

    I keep getting the error 'Object has no method kendoValidator' when executing the following code on a div called login that contains the fields that I want to validate.

    <div data-role="view" id="login">
            <h2>Log in</h2>
            <ul data-role="listview" data-style="inset">
                <li>
                    <input type="text" style="width:60%" id="emailinput" required/>
                    E-mail
                </li>
                <li>
                    <input type="password" style="width:60%" id="passwordinput" required />
                    Password
                </li>
            </ul>
             <a class="button" data-role="button" data-click="logIn" style="float: right; margin: 1em 1em 0 0 ">Log in</a>
        </div>

    $("#login").kendoValidator({
                     messages: {
                       // defines message for the 'custom' validation rule
                       custom: "Please enter valid value for my custom rule",
                       // overrides the built-in message for required rule
                       required: "My custom required message"
                    }
                 });
  2. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 13 Jun 2012 Link to this post

    Hello Jolien,

    Thanks for contacting us. Currently, the validators are not included in the mobile distribution. We are going to address this problem in our next internal build, however. Your telerik points have been updated for this finding. 

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Merx
    Merx avatar
    1 posts
    Member since:
    Oct 2011

    Posted 21 Jun 2012 Link to this post

    Hello, 

    Is this to be resolved in the release for today on the 21st?

    Thanks for a response in advance.
    Martin
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 21 Jun 2012 Link to this post

    Hello Martin,

    I am glad to inform you that the problem is now resolved and the desired functionality is already available.

    Regards,

    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. tan
    tan avatar
    5 posts
    Member since:
    Aug 2012

    Posted 07 Aug 2012 Link to this post

    Hi Iliana, may i know is the trial version of kendoUI that i download through the "download Kendo UI" link support the validator in mobile distribution?
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Aug 2012 Link to this post

    Hi tan,

    The Kendo UI trial download includes all Kendo UI flavors (Web, DataViz, Mobile). I believe this answers your question positively.

    Greetings,
    Sebastian
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. tan
    tan avatar
    5 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    Thanks for the reply. I need some help here. I have tried out something that similar to below code sample:
    $("#myform").kendoValidator({
        rules: {
            custom: function(input){
                return input.val() === "Test";
            },
            foo: function(input){
                return input.val() === "Foo";
            }
        },
        messages: {
            custom: "Your name must be Test",
            foo: "Your name must be Foo"
        }
    });
    and able to allow only "Test" to login to another page. But instead of hardcode as "Test", I want to do validation that load data from xml. Which means that if my xml having username "ABC" and "XYZ", then only user that type in "ABC" or "XYZ" can log in to my next page. I had search through many examples but still getting no clue. I am doing in mobile.

    Appreciate for any help. Thank you.
  8. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 15 Aug 2012 Link to this post

    Hi tan,

    In order to achieve the desired functionality you need a custom implementation. For example you could use the DataSource component to read the data. Hence with the jQuery inArray() method check if the specified value presents in the data. 

    Regards,

    Iliana Nikolova
    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