• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom validators

 
Web 4.0
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a custom validator from for all the fields in the page

where should i specify the path so that the validation gets done
 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put the [ActionClassName]-validation.xml in the package where you put your action class, then in struts.xml, let your package extends strut-default. All the input value will pass through the validation intercepter, and so is the validation done. For more information, please refer to http://struts.apache.org/2.x/docs/validation.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic