I've done a quick test on it on 1.5.5 and I'm experiencing the
duplicate message issue also using the following message options:

remote: function() {
    // $("#email") is the input field for the email address
    return $("#email").val()+' already exists';
}

remote: function(email) {
    return $.validator.format('{0} already exists', email);
}

Both returns the first error message despite changing the value of the
input to another invalid email input.
Can anyone verify if this is the correct way to go about it?

On Sep 28, 11:34 am, James <james.gp....@gmail.com> wrote:
> Could you provide some code on how you're setting the error message
> "... already exists"?
>
> On Sep 28, 7:49 am, Thiago Miranda de Oliveira <thiago...@gmail.com>
> wrote:
>
> > Hi.. I´ve upgraded my validate plugin to the 1.5.5 and I was having a
> > problem:
> > I have an email that needs to be checked if it already exists by ajax,
> > and I was using the Validate Remote Method.
>
> > In my old Validate version ( 1.5) it works great, but in the 1.5.5
> > version when I validate the email field it show primary the correct
> > error message ( if it exists): "Email n...@nono.com already exists".
> > But if I type another existing email, no matter which one, I get the
> > same message with the same email using the validator.format "Email
> > n...@nono.com already exists".
> > I was debugging the code and I´ve found out that in line 932 the 1.5
> > version was written like that:
> > errors[element.name] = response || validator.defaultMessage( element,
> > "remote" );
>
> > And in the 1.5.5 like that:
> > errors[element.name] = previous.message = response ||
> > validator.defaultMessage( element, "remote" );
>
> > So I removed the "previous.message" and it worked great. Does anyone
> > knows why they added this previous.message to this line? And what
> > exactly it does?
>
> > Thanks
>
>

Reply via email to