开发者

validate and submit multiple forms

开发者 https://www.devze.com 2023-01-07 02:18 出处:网络
I have a single page on which I have log in form, registration form and forgot password form. I could validate and submit log in form successfully, but when I tried to validate the registration form,

I have a single page on which I have log in form, registration form and forgot password form. I could validate and submit log in form successfully, but when I tried to validate the registration form, it simply got submitted and did not validate. Can I validate multiple开发者_Go百科 forms in a single page using jquery ? If we can how ? Thanks in advance.


It's certainly possible. Apparently you forgot to attach the validator to other forms than only the first one.


I resolved it. I was using different js files to validate each form separately. I moved all the code to single file and all forms were validated. :)

0

精彩评论

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