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

Multiple Validators/Multiple Div tags?

1 Answer 231 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Iron
Mike asked on 03 Jan 2019, 05:23 PM

Is it possible to have multiple validator initializations on different div tags?  Basically I'm wanting to do a wizard (without the use of the progress bar) and I want to validate one div tag per "next" button.

    function ShowSection2()
    {
        //validation
        var validator = $("#Section1").kendoValidator().data("kendoValidator");
        if (!validator.validate())
        {
            return;
        ...

 

    function ShowSection3()
    {
        //validation
        var validator = $("#Section2").kendoValidator().data("kendoValidator");
        if (!validator.validate())
        {
            return;
        ...

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 07 Jan 2019, 01:52 PM
Hello,

Initializing different Validators for different containers (divs) is possible. Here's a dojo example showing two validators initialized for the "myform1" and "myform2" divs.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Validation
Asked by
Mike
Top achievements
Rank 1
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or