NR031 wrote:
1) How to validate a Date format in Struts 2
I have my <action-class>-validation.xml like this :
<field name="DOB">
<field-validator type="requiredstring">
<message>Please enter your Date of birth</message>
</field-validator>
<!--
Here I have to validate the format
-->
</field>
Perhaps with the date validator:
http://struts.apache.org/2.x/docs/date-validator.html
2) How to compare two fields
I am having password and confirm password fileds. If both the filed values
are not same, I want to display some error message.
<field name="Confirm Password (*)">
<field-validator type="requiredstring">
<message>Please confirm your password</message>
</field-validator>
</field>
Perhaps with the expression validator:
http://struts.apache.org/2.x/docs/expression-validator.html
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org