It's not a secret anymore!*
The moose likes Struts and the fly likes problem in struts validation for salary range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in struts validation for salary range" Watch "problem in struts validation for salary range" New topic
Author

problem in struts validation for salary range

Rajni Patel
Ranch Hand

Joined: Sep 03, 2009
Posts: 84
Hi , I have developed small application in struts. I want to validate salary which is between 500 to 5000 range. I have not add validation-rules.xml in web-inf folder.
I am using link "value = /org/apache/struts/validator/validator-rules.xml" in plug-in in struts-config.xml.

I have written code in validation.xml for salary range as following.



and in messageResources.properties file



so other error message is coming like first name is null.but on salary's place space is coming means nothing is coming.

Please, any body can tell me what should come in validation.xml and messageResources.properties file?

Thanks.
Rajni Patel
Ranch Hand

Joined: Sep 03, 2009
Posts: 84
I have found solution.

in MessageResourece.properties file..it should be errors.range not errors.doubleRange

errors.range={0} is not in the range {1} through {2}.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in struts validation for salary range
 
Similar Threads
Struts ActionForm: ClassCastException caused by FormTag.initFormBean
client side validation
validation message
validation error
Validation framework is not working