File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation doubt

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to make my text box a must field and number only should be entered field through validations.xml

i know that by declaring REQIRED in validation we can make a field must entred. but i do not know about number only should be entred. pls help me

both are on the same field here
thanks in advance
rahul
 
Sujay Ramasamy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi rahul
You have to use mask rule and specify in properties file your alert alert
I am validating zip code, zipcode contain only no.

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much
 
Nyanas Kandhan
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To restrict the user to enter only numbers you need to use mask rule in struts. For an example on this refer here. Mask Validation in Struts
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic