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
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
2 matches
Mail list logo