• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what's the problem? remote of validate with codeigniter

#1
[eluser]Unknown[/eluser]
i trying this code.

$(document).ready(function(){
$("#login_form").validate({
rules:{
mem_id:{required: true,minlength: 4,remote: "/ci/id_chk"},
mem_nm:{required: true},
mem_passwd:{required: true,minlength: 6},
mem_passwd_com:{required: true,equalTo: "#mem_passwd"},
mem_email: {required: true,email: true},
mem_gender: {required: true},
mem_birth: {required: true}
},
messages: {
mem_id: {
required: "아이디를 입력하세요",
minlength: jQuery.format("아이디는 {0}자 이상 입력하세요"),
remote: "이미 등록된 아이디입니다"
},
mem_nm: {
required: "이름을 입력하세요"
},
mem_passwd: {
required: "비밀번호를 입력하세요",
minlength: jQuery.format("최소 {0}자 이상 입력하세요")
},
mem_passwd_com: {
required: "비밀번호를 재입력하세요",
equalTo: "비밀번호가 동일하지 않습니다"
},
mem_email: {
required: "E-mail을 입력하세요",
remote: "이미 등록된 E-mail입니다",
email : "메일 주소를 올바르게 입력하세요"
},
mem_gender: {
required: "선택해 주세요"
},
mem_birth: {
required: "생년월일을 입력하세요"
}
},
submitHandler: function(form){
//do other stuff for a valid form
$.post('MemRegedit_s', $("#login_form").serialize(),function(data){
$('#results').html(data);
});
}
});
});


language is Korean.
remote: "/ci/id_chk"

id_chk file is controller file.
------------------------------------------------------------------
class id_chk extends CI_Controller{

function __construct()
{
parent::__construct();
}

function index()
{
$data = $this->input->post('mem_id');
echo $data;
}
}
-------------------------------------------------------------------

i don't know what's the problem.
plz. help me.

jquery version is jquery-1.5.min.js.
validate version is validate 1.7.

#2
[eluser]InsiteFX[/eluser]
For one you need to create a view to display the information!

Also you need to add a form to get the input.

InsiteFX


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.