That validation plugin finds error labels based on the errorClass.
Manually adding that same class to your actual labels gives the result
you see. Consider using a different class instead.

Jörn

On Thu, Sep 4, 2008 at 5:38 PM, altern <[EMAIL PROTECTED]> wrote:
>
> Could someone tell, why after clicking on sumbit button on second time
> all validation messages disappear? I have form with a lot of radio
> buttons which are required. I've overriden highlight and unhighlight
> methods.
> It is related, I guess, to the hideErrors usage inside validation
> plugin. Am I wrong?
>
> My code of overriden methods:
>
> highlight: function(element, errorClass) {
>                $(element).addClass(errorClass);
>                var label = $(element.form).find("label[for=" +
> element.id + "]");
>                label.addClass(errorClass);
>                label.append('error message');
>            },
>            unhighlight: function(element, errorClass) {
>                $(element).removeClass(errorClass);
>                var label = $(element.form).find("label[for=" +
> element.id + "]");
>                label.removeClass(errorClass);
>                label.empty();
>            },
>

Reply via email to