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?