Hi all,
I am using code below to call the /Account/CheckUserExist to check if #userData_Username is existed, then it will return TRUE.
'userData.Username': {
required: true,
minlength: 2,
remote: {
type: "GET",
async: false,
url: "/Account/CheckUserExist",
data: {
userName: function() {
return $("#userData_Username").val();
}
}
}
},
However, I need the return to be FALSE at "remote" when userName existed. The reason is that if username is existed, remote=true and it will pass validation. What can I do to reverse the boolean value in "remote"?
Any good advise on how to solve this username validation problem? I know it is classic.
Thanks
Username ajax w/ jquery validation (JSON syntax issue)
Moderator: General Moderators