hello I am trying to validate the form using jquery.. here is the code i am using but nothing is happening...
I am putthing this code in head..
<script src="jquery-2.0.3.min.js">
$(document).ready(function () {
$('form').validate({ // initialize the plugin
rules: {
fname: {
required: true,
email: true
},
lastname: {
required: true,
minlength: 5
}
},
submitHandler: function (form) { // for demo
alert('valid form submitted'); // for demo
return false; // for demo
}
});
});
</script>
</head>
However this code is not validating my form fields .
<form id="send" name="form" method="post" action="">
<p>
<label for="name">Name *</label>
<input type="text" name="fname" value="" />
</p>
<p>
<label for="lastnamme">Father Name *</label>
<input type="text" name="lastname" />
</p>