Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in struts validation for salary range

 
Rajni Patel
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic