views:

204

answers:

1

I'm using the jQuery validation plugin in a very similar manner to the Remember The Milk demo.

$("#registrationForm").validate({
  rules: {      
    email: {
      required: true,
      email: true,
      remote: '<%=Url.Action(...) %>'
    },        
  },
  messages: {
    email: {
      required: "Please enter an email address",
      email: "Please enter a valid email address",
      remote: jQuery.format("{0} is already in use")
    }
});

The first time an invalid email (e.g. [email protected]) is submitted, the error message is as expected. However, if I then enter another invalid email (e.g. [email protected]), the validation plugin still displays "[email protected] is already in use."

I've traced the parameters that are reaching the controller specified in Url.Action call and they are definitely correct (i.e. "[email protected]" is sent as the email address when that is what is entered in the field).

Has anyone else run into this or a similar issue using the jQuery validation plugin?

A: 

The user name field on the Remember the Milk demo fails in the same way (when entering user names 'Peter' and 'George'), so you've probably found a bug in the plugin.

Jonas H
Oh..thanks I wasn't sure which items I could use to test that to make the error happen with them.
Jedidja