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

Enable/Disable Validator

3 Answers 353 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 18 Jun 2014, 01:50 PM
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

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 19 Jun 2014, 11:54 AM
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!
 
0
Markus
Top achievements
Rank 1
answered on 20 Jun 2014, 01:52 PM
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!
0
Kiril Nikolov
Telerik team
answered on 23 Jun 2014, 10:49 AM
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!
 
Tags
Validation
Asked by
Markus
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Markus
Top achievements
Rank 1
Share this question
or