在搜索了 google 和 SA 之后,我决定在这里发布这个问题。我已经尝试了我看到的所有解决方案。我检查了括号和逗号。如果有人可以指导哪里错了,这是我的 jQuery
$(document).ready(function(){
$("#form1").validate({
debug: false,
rules: {
passwordid:"required",
username:"required",
password_again :"required",
password_again:{
equalTo: "#passwordid"
},
email: {
required: true,
email: true
}
},
messages: {
email: "Please enter your valid email address.",
username: "Please enter your username",
passwordid:"Enter Password",
password_again:"Please enter the same value",
},
submitHandler: function(form) {
$.ajax
({
type: "POST",
url: "new.php",
data: dataString,
cache: false,
success: function(html)
{
$("#result").html(html);
}
});
});//error shown here:missing} after property list
}
});