Hi, WS
I think I just figured out the answer a moment ago.
This was driving me crazy because I didnt know what
to attach a class to.
However, if you just create a class between the head
tags like
<style type=text/css>
.error {
font-color: red;
}
</style>
and do 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 messages in a css class. Using
Leonardo's suggestion:
errorClass: "msgerro",
errorPlacement: function(error, id) {
error.attr("class", "msgerro");
error.appendTo( element.next() );
},
when msgerro is a css element.
Could be a bug? Or css styles is not supported by your great Form Validation
plugin?
What do you suggest to display error messages in red colour?
Cheers
2007/3/8, Jörn Zaefferer <[EMAIL PROTECTED]>:
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",
> errorPlacement: function(error, id) {
> error.attr("class", "comErro");
> error.appendTo( element.next() );
> }
> });
That is a bug, thanks for spotting it.
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/ <http://jquery.com/discuss/>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/