This is my HTML page..
<div>
<form id="signupForm" method="get" action="">
<table>
<tr><td><input type="button" value="New" onclick="clearuserfields()"/></td></tr>
<tr><td>USERID:</td><td><input type="text" id="userID"/></td></tr>
<tr><td>FNAME:</td><td><input type="text" id="fname" name="fname" /></td></tr>
<tr><td>LNAME:</td><td><input type="text" id="lname" name="lname" /></td></tr>
<tr><td>EMAIL:</td><td><input type="text" id="email" name="email" /></td></tr>
<tr><td>PASSWORD:</td><td><input type="text" id="password" name="password" /></td></tr>
<tr><td>PHONENO:</td><td><input type="text" id="phoneno" name="phoneno" /></td></tr>
<tr><td>ROLL:</td><td><input type="text" id="roll" name="roll" /></td></tr>
<td><input type="button" value="Save" onclick="initialiseusers()"/></td>
<td><input type="button" value="Delete" onclick="deleteuser()"/></td>
</table>
</form>
</div>
this is my JS page
function initialiseusers(){
$("#signupForm").validate({
rules: {
fname: "required",
lname: "required",
email:{
required: true,
email: true
},
password:{
required: true,
minlength: 5
},
phoneno:"required",
roll:{
required: true,
minlength: 2
},
messages: {
fname:"Please enter your firstname",
lname:"Please enter your lastname",
email:"Please enter a valid email address",
password:{
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
phoneno:"Please enter your phoneno",
roll:"Please enter your role"
}
}
updateusers();// when the validation is over this function being called for updating the user.
});
But the validation is not working and when i click the save button.It directly saves Blank values inside my DB I downloaded the validation plugin and added it in the path also.,Any suggestions please?