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

            }
      }
Sadat
  • 3,493
  • 2
  • 30
  • 45
  • 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. – JustinP8 Jul 30 '10 at 17:00
  • i couldnt figured it out too. I have been using a `$.addMethod`, but this way must easier for everything. – Sadat Jul 30 '10 at 18:26

1 Answers1

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

            }
Joel Cunningham
  • 13,620
  • 8
  • 43
  • 49
  • 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. – JustinP8 Mar 01 '11 at 20:58