开发者

Step by Step validation with jquery validation plugin

开发者 https://www.devze.com 2022-12-26 00:17 出处:网络
I know its been asked many times already but no one could come up with solution so far. The idea is to have one form separated into few steps and validate each step on next click of the button. I kno

I know its been asked many times already but no one could come up with solution so far.

The idea is to have one form separated into few steps and validate each step on next click of the button. I know jquery validation plugin is offering quite complicated way of doing it with accordion but开发者_C百科 can anyone come up with a simple solution something like

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

        }
    }

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

hope someone could suggest the best way of doing it.

Thanks.


I don't get exactly what you're getting at, but why not just do separate forms altogether, get all the values together, and send them all in at once in the end?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号