Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Help in Validwhen

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am doing password validation. If the fields newPassword and confirmNewPassword have equal values, i have to proceed to success page.
Entry in the validation.xml is :
<field property="confirmNewPassword" depends="validwhen">
<msg name="validwhen" key="errors.matchfields"/>
<arg0 key="ResetPasswordForm.ConfirmNewPassword"/>
<arg1 key="ResetPasswordForm.NewPassword"/>
<var><var-name>test</var-name><var-value>(*this* == newPassword)</var-value></var>
</field>
When i give equal values in both fields, success page is displayed. But if i give invalid values, there are no error messages (alert messages) shown. "Page cannot be found" error page is shown.
What i have to do show the error in the alert messages(similar to the messages shown for required, minlength etc)
Thanks in advance.
Kavitha
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you specify the input attribute in your ActionMapping?
 
Kavitha Narayanan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
No I havent specified input attribute in ActionMapping.. Does the validation validWhen requires the "input" Attribute?

Thanks,
Kavitha
 
please buy this thing and then I get a fat cut of the action:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic