Functionality Question

6 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 28 Jun 2012 Link to this post

    How does the validation "work" in that what happens when I setup validation on a form element.

    When you call validate() it loops though all required inputs in that form and runs every rule on each of them?...or does it run on every input in that form.

    So then if the rules run per input (seems like this from the demo) can you not setup a global rule that says something like "Count all checked checkboxes on the page and make sure the count is greater than 10"

    Does that make sense?
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 29 Jun 2012 Link to this post

    Hi Steve,

    Indeed, the validation rules are executed for all of the input elements within the container to which the Kendo Validator is attached.

    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 29 Jun 2012 Link to this post

    Ok, followup

    1) Just for inputs marked REQURIED (yes right?)
    2) Is there no way to set a global rule to just check something once and if it fails, have the validation fail into a summary message?
  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 02 Jul 2012 Link to this post

    Steve,

    No, as I have mentioned in my previous message, the validation rules are executed for all of the input elements within the container. If a rule fails for the given input, the remaining rules for this input element are not executed, and the validation process the next input element.

    Greetings,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 03 Jul 2012 Link to this post

    But why would I want a checkbox validation to run for a radiobutton?

    What if I wanted to have something that's not "validating an input" but like I said is a larger validation like Select at least 6 of 12 checkboxes.
  7. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 04 Jul 2012 Link to this post

    Hello Steve,

    Our Validator is target through a more granular level (per element) of validation. However, you may achieve such functionality by using similar to the rule demonstrated in this test page.

    Regards,
    Rosen
    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
Kendo UI is VS 2017 Ready