フォームにエラーが表示されますが、フォームが有効な場合でも (フォームに背景と境界線が付いています)、消えません。
スクリーンショットは次のとおりです。
これが私のjsです:
$(".login").validate({
rules: {
"user[email]":{
email: true,
required: true
},
'user[password]': {
required: true,
minlength: 6,
remote: {
url: "http://127.0.0.1:3000/checkpass",
//url: "http://91.228.126.168:3000/checkpass",
type: "get",
data: {
email: function() { return $("#user_email").val(); }
}
}
}
},
messages: {
"user[password]": {
remote: "You entered wrong credentials"}
},
errorContainer: "#messageBox1",
errorLabelContainer: "#messageBox1 ul",
wrapper: "li"
})
CSS:
#messageBox1{
display: none;
}
#messageBox1{
width: 280px;
padding: 20px 0 20px 20px;
border-radius: 5px;
background: rgb(252, 248, 227) ;
border: solid 1px rgb(192, 152, 83);
margin-bottom: 10px;
}
どうすればこれを解決できますか?