I'd suggest that in your form bean definition you set an initial value of blank to all the properties. Otherwise, if the form bean is in session scope, it retains the values last entered and therefore will pass validation even when no new value is entered.
Thank you for response. Unfortunately, it did not help. The initial values have been assigned to blanks.And, it looks like the validation is not triggered at all. It goes further to the action class, instead of going to the error page.
The form bean is named by the "name" attribute. If I remember correctly the "attribute" attribute is for when the form bean is named something other than the "name" attribute--I've never actually seen anybody use this.
Can you explain a bit more what you're trying to accomplish? I'm just not sure it's necessary to use "attribute".
Joined: Aug 31, 2006
When I retrieved the bean from the session I used the attribute name. I've changed it to form name and everything works perfectly now.