This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation in struts 2 -- Help

 
Jibin Najeeb
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 1: Is there any method to short circuit the validation for each field in void validation method not in xml config.

Question 2: I am using a double valued text field. My validation is
<field name="amount">
<field-validator type="double" >
<param name="minInclusive">100</param>
<param name="maxInclusive">10000000000</param>
<message key="amount.error">
</message>
</field-validator>
</field>
The problem is whenever I type a character in the text field for eg:- abc. The text field showing error like this
""""Invalid Field Value For Amount""" and
""" amount.error"""

I only want to display the first erro when I type a character and not the second one. How to do? . I think the field cannot be manually coded for Invalid character . Not Sure Though. Any help appreciated Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic