Enable/Disable Validator

4 posts, 0 answers
  1. Markus
    Markus avatar
    10 posts
    Member since:
    May 2012

    Posted 18 Jun 2014 Link to this post

    Good afternoon all,
    The KendoUI Validator as it stands is not very powerful. We have the scenario at the moment where we have two forms on the same page. We want to have on blur validation and on submit of a certain form then validation of that specific form only. At the moment binding the validator on document ready causes the other form to also validate even if it's not the one getting submitted. Is there a way to fix this or at least disable the validator on focusout of the form or something? 

    In general the validator misses a lot of configuration options (auto validate, etc), event hooks (before validate triggers, on blur validation, etc) and methods(validate specific rule, disable, enable, showMessages, focus on first error of form, etc).

    Looking forward to your responses!

    Thanks
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 19 Jun 2014 Link to this post

    Hello Markus,

    I am not really sure that I understand exactly what your scenario is. If you have two forms in your page, then you can create two separate validators that will handle the validation of each forms, that wil handle the onblur and onsubmit validation separately.

    As for your suggestion - please submit feature requests for the same in our UserVoice section, so we can see them implemented in the future.

    Regards,
    Kiril Nikolov
    Telerik
     
    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. Markus
    Markus avatar
    10 posts
    Member since:
    May 2012

    Posted 20 Jun 2014 in reply to Kiril Nikolov Link to this post

    Hi Kiril,
    I have 2 forms and once the page loads I initialize on each, a http://demos.telerik.com/kendo-ui/validator/index

    Lets say a login form next to a registration form. They both have mandatory parameters. I fill in the login form (correctly) i submit it and it complains about the mandatory params in the registration form. I want it to only validate the form i'm currently focused on.

    Is this possible?

    Thanks!
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 23 Jun 2014 Link to this post

    Hello Markus,

    They should be two separate forms with two different Kendo UI Validators. Please check the following example and let me know if it helps:

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

    Regards,
    Kiril Nikolov
    Telerik
     
    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