noob needs help..

noob needs help..


found this somewhere and try to test and learn from this
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript>
$().ready(function() {
// validate signup form on keyup and submit
$("#form-name").validate({
rules: {
sender_name: "required",
sender_email: {
required: true,
email: true
},
recipients: {
required: true,
email: true
}
},
messages: {
sender_name: "<span
style='color:red;font-weight:bold'>*</span>",
sender_email: "<span
style='color:red;font-weight:bold'>*</span>",
recipients: "<span
style='color:red;font-weight:bold'>*</span>"
}
});
});
</script></head>
<form id="form-name" action="" method="post" target="_blank">
<input type="text" size=3 name = "sender_email" id="sender_email" />
<label for="sender_email">textarea</label><input type=submit
value="Generate" />
</form>
Everything i copied as is, only the form is what i wrote myself.
Why isn't it doing any of those checking, instead it is passing
anything that i put into that textarea when it is suppose to check to
see if it is a valid email before submitting