aspose file tools*
The moose likes Struts and the fly likes Validation in struts 2 -- Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validation in struts 2 -- Help" Watch "Validation in struts 2 -- Help" New topic
Author

Validation in struts 2 -- Help

Jibin Najeeb
Greenhorn

Joined: Nov 27, 2012
Posts: 6
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
 
Don't get me started about those stupid light bulbs.
 
subject: Validation in struts 2 -- Help
 
Similar Threads
validation in struts2
error in validation
validation: how to make int and double validations work ?
required validator not working
Struts 2 Validation