I need to validate a register form using Jquery. and i tried using jquery validate method but i am not getting output.
------------------------------------------------------------------------
can any body help where i am wrong?
-----------------------------------
I am attaching what i have done.. plz help me..
-----------------------------------------------
$(document).ready(function () {
$("#form1").validate({
rules: {
txtfirstname: "required", // simple rule, converted to {required:true}
txtlastname: "required",
txtusername: "required",
txtpassword: "required",
txtemail: {// compound rule
required: true,
email: true
},
txtaddress: "required",
txtstate: "required",
txtcity: "required",
txtzip: "required"
},
messages: {
txtzip: "Please enter a comment."
}
});
});
Firstname | |
Lastname | |
Username | |
Password | |
Email | |
Address | |
State | |
City | |
Zip | |
Jignesh TrivediPosted Apr 2, 2014, 12:22 AM
hi,
Please refer below link it might help you to resilve your problem
http://jqueryvalidation.org/documentation/
http://formvalidator.net/
Lalit RaghuvanshiPosted Apr 1, 2014, 1:03 PM
Best example to implement stylish jQuery form validations in asp.net
Example to implement Jquery form validations in asp.net C#,Vb.net
Naresh AvariPosted Mar 27, 2014, 12:52 AM
After checking your code, I have noticed that the submit button type should be 'submit', not 'button'.
I have re-tested your code in my machine. But I am not using your .js files. Please refer the below code...