Re: validation 1.2 view code.

2008-05-30 Thread b logica

Is the error-message div inside the span? Just after it?

span div.error-message { display: none; }
span + div.error-message { display: none; }

I assume you're giving the span a classname, which would tighten up
those rules somewhat.

It may be better, though, to deal with this through Cake in the first
place, if possible.

On Fri, May 30, 2008 at 10:26 AM, leo [EMAIL PROTECTED] wrote:

 I'm trying to avoid this snippet of code which appears when validation
 fails. The 1 is because the message is zero length.

 div class=error-message1/div

 The div is forcing a new line in the form, thereby screwing up the
 layout. My intention instead is to change the colour of the label
 text. I detect the validation error with $this-
validationErrors['Model'] and conditionally surround the input with a
 span.

 I didn't have this problem last time I used validation, but for the
 life of me I can't see what I'm doing differently.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: validation 1.2 view code.

2008-05-30 Thread leo

thanks - got the answer of the irc group:

$form-input('adreca',array('error'=false

On 30 Maig, 17:54, b logica [EMAIL PROTECTED] wrote:
 Is the error-message div inside the span? Just after it?

 span div.error-message { display: none; }
 span + div.error-message { display: none; }

 I assume you're giving the span a classname, which would tighten up
 those rules somewhat.

 It may be better, though, to deal with this through Cake in the first
 place, if possible.

 On Fri, May 30, 2008 at 10:26 AM, leo [EMAIL PROTECTED] wrote:

  I'm trying to avoid this snippet of code which appears when validation
  fails. The 1 is because the message is zero length.

  div class=error-message1/div

  The div is forcing a new line in the form, thereby screwing up the
  layout. My intention instead is to change the colour of the label
  text. I detect the validation error with $this-
 validationErrors['Model'] and conditionally surround the input with a
  span.

  I didn't have this problem last time I used validation, but for the
  life of me I can't see what I'm doing differently.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---