wood burning stoves 2.0*
The moose likes Struts and the fly likes validator.xml expression problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validator.xml expression problem." Watch "validator.xml expression problem." New topic
Author

validator.xml expression problem.

victor chiong
Ranch Hand

Joined: Apr 04, 2012
Posts: 73
Hi Guys,

I am a newbie here and I just want to know why this does not work?

password and retypepassword are fields. public Strings.

I also tried !(getPassword().equals(getRetypepassword()) and it would not work.. please help? thanks... My other fields are okay, they will validate. But if i inserted the xml element below, the validation will no longer work..

<field name="password">

<field-validator type="requiredstring">
<message>Please enter your password?</message>
</field-validator>

<field-validator type="expressions">
<param name="expression">password ne retypepassword</param>
<message>Password is not the same.</message>
</field-validator>
</field>


 
Don't get me started about those stupid light bulbs.
 
subject: validator.xml expression problem.
 
Similar Threads
validation in struts2
How to valdate password and confirm password using validation framework in struts2?
Multiple field validation in Struts2 Validation using validation.xml file
error in validation
not validating