I would like to setup my pages so that form validation errors do two things

a) Change the class of a surrounding div so that it also has a class of error 
(so I can render the surrounding box differently using CSS)
b) Add in a <p class="error"> element to describe the error message

It appears that the approach should be to extend the ValidationDelegate class, 
and override the writePrefix method (to output <div class="error"><p 
class="error">Error message</p>) and override the writeSuffix method (to 
output </div>)

Is this the correct approach, and

does the Prefix/Suffix surround just the component in error, or its associated 
field label as well? 

If it doesn't include the field label, is there an alternative?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to