我想檢查兩個條件與遠程URL在同一領域,但無法做到這一點。如何在單個字段中使用多個遠程URL驗證
這裏的第一個條件是從數據庫檢查相同的電子郵件ID以及用戶不能輸入具有相同域的電子郵件ID。例如,如果有人首先輸入[email protected],它會檢查相同的電子郵件ID不應該在數據庫中,如果不是,那麼它應該檢查數據庫中沒有其他電子郵件ID是否應該將gmail作爲域名。
我的代碼是像下面
<script>
$(function(){
$("#registration").validate({
rules: {
usr_email: {
required:true,
email:true,
remote:"registration.php?fn=check_email&usr_email=usr_email"
},
usr_pass: {
required:true,
minlength:5
},
usr_confirm_pass: {
required:true,
minlength:5,
equalTo: "#usr_pass"
}
},
messages: {
usr_email: {
required: "Cannot be left Blank !",
email: "Invalid Email !",
remote: "This Email cant be used. Plz Try Another one!!!"
},
usr_pass: {
required: "Cannot be left Blank !",
minlength: "Password must be 5 character long"
},
usr_confirm_pass: {
required: "Cannot be left Blank !",
minlength: "Password must be 5 character long",
equalTo: "Passwords do not Match !"
}
}
});
});
</script>
則需要提供遠程驗證功能(registration.php的2 FN = is_exist_record&TB =用戶字段= usr_email&act =被添加) – BobbyTables
該功能僅歸國根據病情.. – TECHNOMAN
以及真或假,如果修改是什麼函數到你的支票?並返回true/false – BobbyTables