現在エラーが発生しているjQuery Validateを使用した検証関数があります。
キャッチされていない SyntaxError: 予期しない数です
それでも、コードの何が問題なのかを正確に見つけることができないようです。問題のある行をコメントアウトして削除しようとしましたが、別のエラーしか表示されません
キャッチされていない SyntaxError: 予期しない識別子
私のコード:
<script type="text/javascript">
$(document).ready(function(){
$.extend($.validator.messages,{
equalTo: "Your passwords do not match.",
remote: "The password you entered is incorrect."
});
$('#PasswordChange').validate(function() {
rules: {
ChangePassNew: {
required: true,
minlength: 6 //<-- the line giving the error.
},
ChangePassConfirmNew: { //<-- the line giving the new error once the offending line is commented out
required: true,
minlength: 6
},
ChangePassConfirmOld:{
required: true,
minlength: 6,
remote: "verifypass.php"
},
messages: {
ChangePassNew: {
required:"Please enter a password.",
minlength:"Please enter at least 6 characters."
},
ChangePassConfirmNew: {
required:"Please enter a password.",
minlength:"Please enter at least 6 characters."
},
ChangePassConfirmOld: {
required:"Please enter a password.",
minlength:"Please enter at least 6 characters.",
remote:"The password you entered is incorrect."
},
},
},
submitHandler:function(form){
form.submit();
}
});
});
</script>
どんな助けでも大歓迎です。