Make sure you've added this to you ApplicationResources.properties
file as the 'email' rule expects a message named 'errors.email' - check the code for it
and you will see.
errors.email={0} is an invalid e-mail address.
below is a snippet from my JSP where the e-mail entry field is declared:
<td width="24%" align="right"><bean:message key="validateForm.emailField.displayname"/></td>
<td width="76%" align="left">
<html:text property="emailField" />
<html:errors property="emailField" />
</td>
and the associated entry in the validation.xml file...
<field property="emailField" depends="email" > <arg0 key="validateForm.emailField.errorname"/> </field>
other pertinent entries (for the code above) in the ApplicationResources.properties file:
validateForm.emailField.displayname=<span class="formLabel">An email:</span>
validateForm.emailField.errorname=Foo
works great - makes its own sauce...
-jeff
On Friday, October 3, 2003, at 03:25 AM, Jeroen Breedveld wrote:
Hi all,
Is it possible to supply the msg element with the value the user entered
in the form as the content of the arg element?
My key errors.login.email.invalid is: {0} is an invalid email address So when a user enters 'foo' as an email adres I want an error message saying: 'foo is an invalid email address'
Is this possible? Here is the code:
<form name="MailPasswordForm"> <field property="email" depends="required,email"> <msg name="required" key="errors.login.email.required"/> <msg name="email" key="errors.login.email.invalid"/> <arg0 name="email" key="email"/> </field> </form>
Thanks and regards,
Jeroen
--
X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 2818080 http://www.x-hive.com
--------------------------------------------------------------------- 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]