I am currently add the validation rules to: 1. the method validate() of the ActionForm 2. the pattern matching rules inside validate.xml
However, I found something interesting.
Before I add the checking, when I put my data inside the JSP, the form captures the data, and they display correctly in the textfields (Many add/drop actions are done and redirect back to the original page).
In these cases, I will not do anything for checking.
However, when the user clicks submit, I will let the form be checked by validate(), as well as the validate.xml.
If there is no errors, that's fine, the data can be saved inside the DB.
But if there is errors, the form data is reset to the original value!!! All updates are lost!