My script throw errors:
TypeError: jQuery.validator is undefined additional-methods.js:20 TypeError: $(...).validate is not a function index.php:115
Probably, I have mistake in jQuery code.
<head>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script src="http://jquery.bassistance.de/validate/additional-methods.js"></script>
</head>
<body>
<form id="registerForm" method="post" action="logrej.php">
<input name="login" type="text"/>
<input name="nick" type="text"/>
<input type="password" id="passw" name="password"/>
<input type="password" name="retype" />
<input type="submit" value="Zarejestruj!" />
</form>
<script>
$("#registerForm").validate({
rules: {
login: {
required:true,
rangelenght: [4,20],
remote:"look.php"
},
nick : {
required:true,
rangelenght:[4,20],
remote:"look.php"
},
password: {
required:true,
rangelenght:[4.20]
},
retype: {
required:true,
equalTo:"#passw"
}
},
messages:{
login:{
required:"To pole jest wymagane!"
}
}
})
</script>