To get the error appear next to the field add the following :
<html:messages id="error" property="<FIELD_NAME>">
<bean:write name="error" />
</html:messages>
to change the text of the field label
(if your form is a table)
...
<td <html:messages id="error" property="<FIELD_NAME>">class="error"</html:messages>>
Field label
</td>
<td><html:text property="<FIELD_NAME>"></td>
<td class="error">
<html:messages id="error" property="<FIELD_NAME>">
<bean:write name="error" />
</html:messages>
</td>
...
"Scott Purcell" <[EMAIL PROTECTED]>
07/08/2005 02:58 PM
|
|
I am seeking some advice on the following:
I have a site which uses the validator.xml and validation.xml files, and within the jsp pages, I am using the <logic tag to display the messages.
All works great, but I want to go further with my validation. Upon some investigating on other sites, I have noticed that some sites will actually change the text in front of textfields to a red along with a message about the error.
I would like to be able to perform this type of error display, instead of the simple message that comes from the html:messages error, which is a list of problems.
has anyone seen this done, or have any ideas where to begin with this?
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]