[jQuery] [Validate] Can't seem to figure out what is wrong.

[jQuery] [Validate] Can't seem to figure out what is wrong.


The page below always gives me the message "[object HTMLInputElement]
has no name assigned" (twice).
What doesn't it like?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript"
src="http://dev.jquery.com/view/trunk/plugins/validate/
jquery.validate.js"></script>
<link rel="SHORTCUT ICON" href="http://localhost/favicon.ico" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" />
<title>Welcome to Bonddesk*Syndicate</title>
<style type="text/css">
.LoginTxtBox {}
.BodyPanel {}
</style>
<script type="text/javascript">
$(document).ready(function() {
try {
$("#loginForm").validate({
debug: true,
messages: {
username: {
required: "Enter your username"
},
password: {
required: "Enter your password.",
minLength: "At least 6 characters are
necessary"
}
},
rules: {
username: {
required: true,
email: true
},
password: {
required: true,
minLength: 6
}
}
});
}
catch (error) {
alert(error);
}
});
</script>
</head>
<body class="BodyPanel">
<form action="/Account/LogOn" id="loginForm" method="post">
<input id="username" type="text" class="LoginTxtBox" tabindex="1" />
<input id="password" type="password" class="LoginTxtBox"
maxlength="12" tabindex="2" />
<input id="submit" type="submit"/>
</form>
</body>
</html>