my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validator.xml expression problem." Watch "validator.xml expression problem." New topic

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 type="expressions">
<param name="expression">password ne retypepassword</param>
<message>Password is not the same.</message>

It is sorta covered in the JavaRanch Style Guide.
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