3
      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."

            }
      }
2
  • I had this problem once too and never figured it out. I gave up and wrote a custom $.addMethod. I'm interested in the answer. Commented Jul 30, 2010 at 17:00
  • i couldnt figured it out too. I have been using a $.addMethod, but this way must easier for everything. Commented Jul 30, 2010 at 18:26

1 Answer 1

6

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."

            }
Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.