Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am a beginner to web development and

I have created a form using bootstrap and wanted to validate it using jquery validation plugin .

Please help me validating my form . Thanks

I have a two sections (Login and Sign up) All I want is I want the code to check is

Check if user name and password is entered when login collapse is open.
When the signup collapse is open my code has to validate all the fields there .

link to my jsfiddle code[^]
Posted

1 solution

I suggest you to have to buttons. One for Sign In and other is for Sign Up. Don't mix these two. So, now you can write your logic to check validation inside those button click events separately, which will validate different forms.

Sign In click will validate the UserName and Password and Sign Up will validate all the fields given there for registration.
 
Share this answer
 
Comments
ajayyee 11-Jan-15 13:17pm    
The code has two buttons . (one for signup and other for login)

The thing is I am new to jquery and after a long try I could now make it up validating my form :( , It exactly does not work with only my code

I also tried the code from some forum http://jsfiddle.net/s3jqggfn/2/ this too did not work
Did you debug the code and find out the issue?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900