Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To Write validate() Instead of Using the validation.xml?

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am submitteing a form. This form provides check boxes for multiple selections. I am not using the validation.xml to validate if "none" is selected. Instead, I am going to use the validate().

1. Do I write this validate() in the form class that extends the ActionForm?

2. how do I write this validate() method?

3. Where does this 'ae' return to?

My form class looks like:
 
tukai chakraborty
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.)u need to write the validate() method in the form.
2.)ae will return to ur input page,i.e. the jsp.and there u need to write the <html:errors/> to trap the the errors and display the error message in the jsp page.
3.)??? is any KEY u associate with the error object
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic