Re: [jQuery] Problem with validation

2007-03-08 Thread Leonardo K
Your code don't solve my problem, but I believe that I found the problem. The problem is the label class. When I set the errorClass, the label still have the class='error'. $(form).validate({ focusInvalid: false, event: blur, debug: true, errorClass: comErro, errorPlacement: function(error, id)

Re: [jQuery] Problem with validation

2007-03-08 Thread Leonardo K
Can I suggest something? Instead of making for example: messages:{ fieldName: { required: blabla } } To use a standard for all the messages: messages:{ required: blabla } ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Problem with validation

2007-03-08 Thread Jörn Zaefferer
Leonardo K schrieb: Your code don't solve my problem, but I believe that I found the problem. The problem is the label class. When I set the errorClass, the label still have the class='error'. $(form).validate({ focusInvalid: false, event: blur, debug: true, errorClass: comErro,

Re: [jQuery] Problem with validation

2007-03-08 Thread Jörn Zaefferer
Leonardo K schrieb: Can I suggest something? Instead of making for example: messages:{ fieldName: { required: blabla } } To use a standard for all the messages: messages:{ required: blabla } You can override default messages by modifying the jQuery.validator.messages object. So in

Re: [jQuery] Problem with validation

2007-03-08 Thread Web Specialist
Jorn, I'm still having problems to display error messages in a css class. Using Leonardo's suggestion: errorClass: msgerro, errorPlacement: function(error, id) { error.attr(class, msgerro); error.appendTo( element.next() );

Re: [jQuery] Problem with validation

2007-03-08 Thread Rick Faircloth
nothing else, your validation error messages should be red! Rick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Web Specialist Sent: Thursday, March 08, 2007 8:42 PM To: jQuery Discussion. Subject: Re: [jQuery] Problem with validation Jorn, I'm still having problems to display error

[jQuery] Problem with validation

2007-03-07 Thread Leonardo K
Whenever plugin validates the field it creates new label with error JS: $(form).validate({ focusInvalid: false, event: blur, debug: true, errorPlacement: function(error, id) { error.appendTo( $(id).next() ); } }); HTML: li class= label for=titulo Títulospan class=req * /span/ label div

[jQuery] Problem with validation

2007-03-07 Thread Leonardo K
Whenever plugin validates the field it creates new label with error JS: $(form).validate({ focusInvalid: false, event: blur, debug: true, errorPlacement: function(error, id) { error.appendTo( $(id).next() ); } }); HTML: li class=label for=tituloTítulospan class=req * /span/label div input

Re: [jQuery] Problem with validation

2007-03-07 Thread Jörn Zaefferer
Leonardo K schrieb: Whenever plugin validates the field it creates new label with error I forgot to update the example about errorPlacement, d'oh. Try this: errorPlacement: function(error, element) { error.appendTo( element.next() ); } I tried your example here, and it works. If the above