Here is a way to do it that works with 1.1:

<logic:messagesPresent name="org.apache.struts.action.ERROR" property="username">
<bean:message key="error.username.required"/>
</logic:messagesPresent>
<p>Username: <html:text property="username"/></p>


Not sure if that tag has changed for 1.2.

Erik


Struts User wrote:

Hello,

Currently, I am using struts validator to validate the fields in my ActionForm.

Before I updated to struts 1.2.4, I could add an error this way - errors.add(
"username", new ActionError("error.username.required"));

If the validation failed, the error message for username will be
displayed right beside the user name text field if I use <P>Username:
<html:text property="username"/></P>.

Can someone tell me how to display error message beside an input field
using struts validator?

Thanks,
Lee

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





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



Reply via email to