Validator on large number of radio inputs

2 posts, 0 answers
  1. Lovro
    Lovro avatar
    1 posts
    Member since:
    Dec 2013

    Posted 21 May 2014 Link to this post


    the problem is validator is really slow(beacuse i have about 400 radio inputs - 130 radio button groups). Here is the code of the custom rule of the validator:

            rules: {
                radio: function (input) {
                         //if type radio and required attribute on the input
                    if ("[type=radio]") && input.attr("required")) {
                              //check if any radio button is selected from the radio button group
                        return $("#testWizard").find("[name=" + input.attr("name") + "]").is(":checked");
                    return true;
            messages: {
                radio: "Choose one of the items"

    The best solution would be that validation code breaks when the first validation error is found. But i don't know how to achieve this.
    Maybe any other suggestions?


  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 22 May 2014 Link to this post

    Hello Lovro,

    The performance that you see is somewhat expected. Going through your form with 400+ DOM elements is a slow process in general and I am afraid that no optimization could be made.

    As for the breaking when the error is found - currently there is not such feature, the Kendo UI Validator, work for all elements in the container, so it will show all the errors for every single fields that fails the validation.

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top