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

Validation Confusion

1 Answer 61 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 24 Jan 2013, 09:28 PM
I'm using Icenium to create a new mobile app with Kendo UI. I'm trying to learn to use form validation and I'm not having much success. I tried to copy the relevant code here:

http://jsbin.com/uzegiv/1/edit

Here are my issues/questions:

1. The Name field shows an error even if I type a name.
2. The checkbox required validation seems wonky in general.
3. Please look through and see if I am doing anything generally dumb.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 06 Feb 2013, 03:08 PM
Hi Maxwell,

I have already replied to your questions in the support ticket that you submitted on the same subject. For convenience I am pasting my reply here as well:
  1. The error for Name displays even when I type a valid name.
    I would like to remind you that each custom rule will be run for each element in a form. The error message displays event when you type a valid name because when the custom rule is evaluated it returns false.
    confirmPassword: function(input) {
        return input.is("[name=confirmPassword]") && input.val() === $('#formCreateAccount input[name="password"]').val(); //always returns false for name's input
    }


  2. The checkbox validation seems really wonky in general.
    I removed the custom validation rules and got everything to work as expected. Please check the custom validation logic and pattern reg expressions and let me know if the problem with the check box still persists.

I hope this will help.

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
Max
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or