Step by step validation using jquery validation plugin

I know that he was asked many times, but so far no one could find a solution.

The idea is to split one form into several steps and check each step the next time you press a button. I know that the jquery validation plugin offers a rather sophisticated way to do this with an accordion, but can anyone come up with a simple solution, something like

var stepOne = {
        rules: {
            fieldname1: "required",
            fieldname2: "required",

        }
    }

$("form").validate(stepOne); //onclick 

hope someone can suggest a better way to do this.

Thank.

+3
source share
1 answer

, , , ?

0

Source: https://habr.com/ru/post/1740433/


All Articles