This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts checkbox validation

 
K Amin
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help me with this kind of valadition which has a checkbox and 2 password input fields, if the checkbox is checked then password filds are required otherwise not. For other forms in this application I am using client-side validation.

Thanks in advance
 
Dom Lassy
Ranch Hand
Posts: 181
 
K Amin
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lassy,

I have been trying to use "validwhen" but I couldn't get it work. I am sending you the code, if you can help me what to write in validation.xml that will be great

<tr>
<td><bean:message key="label.changepassword"/></td>
<td><html:checkbox property="changePassword" /></td>
</tr>
<tr>
<td><bean:message key="label.password"/></td> </td>
<td><html assword property="password" /></td>
</tr>
<tr>
<td><bean:message key="label.passwordagain"/></td>
<td><html assword property="passwordagain" /></td>
</tr>

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic