[jQuery] Re: adding different class for only 1 error element?

2008-11-24 Thread Cronet

Thank you for your reply.

Your solution worked fine... I could add a different class to one only
one error.

A further question:

Is it possible to wrap only 2 of the errors with an extra container?

Is this possible with 'errorLabelContainer', or is that globally
set ?!



On 23 Nov., 22:24, Daniel [EMAIL PROTECTED] wrote:
 Hi AxIF,

 you can use the errorPlacement:

 errorPlacement: function(error, element) {
                  if(element.attr(id) == 'cname'){ // match your
 element's id
                    error.addClass(invalid); // add invalid class
                    error.appendTo(element.parent()); // this line will
 change depends on your form layout
                }else{
                   error.appendTo(element.parent()); // this line will
 change depends on your form layout
                }
              }

 Daniel.

 On Nov 24, 12:40 am, Cronet [EMAIL PROTECTED] wrote:

  Hi,

  i would like adding all errors the call .inlineError ... Simply done
  with

          $(#UserAddForm).validate({
                          errorClass: inlineError
                    }
          });

  Is it possible adding to one Element the class .error, all
  others .inlineError ?

  Regards,
  AxlF


[jQuery] [validate] adding different class for only 1 error element?

2008-11-23 Thread Cronet

Hi,

i would like adding all errors the call .inlineError ... Simply done
with

$(#UserAddForm).validate({
errorClass: inlineError
  }
});

Is it possible adding to one Element the class .error, all
others .inlineError ?

Regards,
AxlF