hi guys i have a problem i am searching for it but couldnt find that code right.can any one fix it.i want to change my text field colour to red while it is left empty or doesnt specify the condition applied on this...here is my code below
<!doctype html>
<html>
<head>
<script src="jquery.js"></script>
<script src="validate.js"></script>
<script>
$(document).ready(function(){
$("#register").validate({
rules:{
name:{
required: true,
minlength: 6,
},
email:{
required: true,
email: true,
},
password:{
required: true,
minlength: 6,
},
}
});
});
</script>
<style>
label {
width: 150px;
display: inline-block;
}
</style>
</head>
<body>
<form id="register">
<label>Name</label>
<input type="text" name="name"/><br />
<label>Email</label>
<input type="text" name="email"/><br />
<label>Password</label>
<input type="text" name="password"/><br />
<label></label>
<input type="submit" name="submit"/><br />
</form>
</body>
</html>