rules: {
email : {
required : true,
email : true,
remote: {
url: SITE_URL + 'index.php?sign_up/emailValidate',
type: "post",
data: {
email: function() {
return $("#email").val();
}
}
}
}
},
message:{
email: {
required : "Email cant be empty.",
email : "Please enter a valid email",
remote : "This email already exists."
}
}
1 Answer
You have a typo in your code. You should use 'messages' instead of 'message'.
messages:{
email: {
required : "Email cant be empty.",
email : "Please enter a valid email",
remote : "This email already exists."
}
1 Comment
JustinP8
I bet I did the same thing way back when I couldn't get that working. Is it possible the jQuery docs had the typo in it too, I'm almost sure I checked every possible detail against their sample.
$.addMethod. I'm interested in the answer.$.addMethod, but this way must easier for everything.