Zend changing validation error behavior: wrapping element in another tag

Madelyn_Vermont

New Member
I've set a validator for the email so it can't be empty. This is the markup of the usual form that zend_form generates:\[code\]<dt id="email-label"><label class="required" for="email">Email</label></dt><dd id="email-element"> <input type="text" value="" id="email" name="email"></dd>\[/code\]When validation fails, zend_form adds a new \[code\]ul class="errors"\[/code\] inside the dd\[code\]<dt id="email-label"><label class="required" for="email">Email</label></dt><dd id="email-element"> <input type="text" value="" id="email" name="email"> <ul class="errors"> <li>Value is required and can't be empty</li> </ul></dd>\[/code\]How can I change this default behavior slightly so that the entire \[code\]dt dd\[/code\] gets wrapped in a single \[code\]p\[/code\] or \[code\]something\[/code\] that I can add an error class to? My guess is that I need to specify to zend_form how to behave when an element has errors.
 
Back
Top