why isn't my validator working?
- by Lina
hi, can anybody tell me why is the following code not working?
<script type="text/javascript" src="../../Scripts/jquery.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.validate.js"></script>
<script type="text/javascript">
$(function() {
// validate contact form on keyup and submit
$("#myform").validate({
//set the rules for the fild names
rules: {
hour: {
required: true,
minlength: 2,
range:[0,23]
},
minute: {
required: true,
minlength: 2,
range:[0,60]
},
},
//set messages to appear inline
messages: {
hour: "Please enter a valid hour",
minute: "Please enter a valid minute"
}
});
});
</script>
<style type="text/css">
.error {
color: red;
font: 12pt verdana;
padding-left: 10px
}
</style>
<form id="myform" method="" action="">
<input id="hour" type="text" name="hour" style="width:30px; text-align:center;"></input> :
<input id="minute" type="text" name="minute" style="width:30px; text-align:center;"></input>
<br/>
<input type="submit" value="Validate!" />
</form>
thanks a million in advance,
Lina