struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kelly.Graus" <Kelly.Gr...@toltech.net>
Subject Re: [S2] Matching string validator
Date Mon, 14 Apr 2008 17:32:41 GMT


Guillaume Bilodeau wrote:
> 
> Sure, you can use an ExpressionValidator annotation with an OGNL
> expression like this:
> 
> @ExpressionValidator(expression = "password1.equals(password2)", ...)
> 
> Cheers,
> GB
> 

Thanks for the reply!  I'm using field validators, so I did this:

<field-validator type="fieldexpression">
       	<![CDATA[#password1.equals( password2 )]]>
      	<message>The passwords do not match!</message>
</field-validator>

Which works perfectly.  Thanks!

Kelly
-- 
View this message in context: http://www.nabble.com/-S2--Matching-string-validator-tp16679023p16680522.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message