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

Validators for mobile

7 Answers 143 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jolien
Top achievements
Rank 1
Jolien asked on 11 Jun 2012, 11:00 AM
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"
                }
             });

7 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 13 Jun 2012, 07:46 AM
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!
0
Merx
Top achievements
Rank 1
answered on 21 Jun 2012, 06:11 AM
Hello, 

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

Thanks for a response in advance.
Martin
0
Iliana Nikolova
Telerik team
answered on 21 Jun 2012, 03:45 PM
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!
0
tan
Top achievements
Rank 1
answered on 08 Aug 2012, 01:22 AM
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?
0
Sebastian
Telerik team
answered on 08 Aug 2012, 10:31 AM
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!
0
tan
Top achievements
Rank 1
answered on 10 Aug 2012, 07:57 AM
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.
0
Iliana Nikolova
Telerik team
answered on 15 Aug 2012, 07:07 AM
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!
Tags
General Discussions
Asked by
Jolien
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Merx
Top achievements
Rank 1
Iliana Nikolova
Telerik team
tan
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or