Monday, January 4, 2010

Error Placement / Styles

Is it possible to determine where the error class gets added?
 
for example:
 
<fieldset>
 <ul>
  <li><?php echo $form->input('User.password', array('label' => 'Password:')); ?>
          <p class="form_hint"><span class="bold red">Required:</span> Password must be minimum of 8 characters.</p></li>
  <li><?php echo $form->input('User.username', array('label' => 'Select a Username:')); ?>
          <p class="form_hint"><span class="bold red">Required:</span> Username can never be changed.</p></li>
 
 </ul>
</fieldset>
 
So if a field fails i would like to add the error class to the <li> so the entire row gets the error class like <li class="error">   
 
Thanks 
 
Dave

No comments: