struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Erickson" <derick...@cmcflex.com>
Subject Validator-How to put the fields value in the resulting error message?
Date Tue, 03 Feb 2004 23:56:00 GMT
Hey all, still new with the validator.. I'm using the emailAddress validator
and I just want it to put the value of the field in the error message if its
not valid.. ie:
blah!blah.com is not a valid email address.

however I can't seem to make that happen.. here's what I've tried:
<form name="/getPassword">

<field property="userName" depends="required">

<arg0 key="User Name" resource="false"/>

</field>

<field property="emailAddress" depends="required,email">

<arg0 key="${emailAddress}" resource="false"/>

</field>

</form>

and in my properties file

errors.email=<li>{0} is an invalid e-mail address.</li>



Thanks,

David


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message