This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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