Struts 1.3 : Validating forms / password field

2013-03-22 Thread J.V.
I have some code that does not use the Apache commons validator plugin. There is a method in LoginForm.java validate() that calls isPasswordValid(password) that will query the database and validate the password and set an error message if not, and this error message is retrieved in the Action

Re: Struts 1.3 : Validating forms / password field

2013-03-22 Thread Paul Benedict
The best approach is to make validate() deal with syntax validation. At the beginning of your execute() method, run business logic validation and construct ActionErrors if your business logic fails. You really shouldn't be trying to stuff business logic in the validate() method -- keep that for