org.apache.struts.validator
Class ValidatorActionForm
java.lang.Object
|
+--org.apache.struts.action.ActionForm
|
+--org.apache.struts.validator.ValidatorForm
|
+--org.apache.struts.validator.ValidatorActionForm
- All Implemented Interfaces:
- java.io.Serializable
- public class ValidatorActionForm
- extends ValidatorForm
- implements java.io.Serializable
This class extends ValidatorForm and provides
basic field validation based on an XML file. The key passed into the
validator is the action element's 'path' attribute from the
struts-config.xml which should match the form element's name attribute
in the validation.xml.
- See
ValidatorPlugin
definition in struts-config.xml
for validation rules.
- Since:
- Struts 1.1
- Version:
- $Revision: 1.6 $ $Date: 2002/10/18 01:35:02 $
- Author:
- David Winterfeldt
- See Also:
- Serialized Form
Field Summary |
private static org.apache.commons.logging.Log |
log
Commons Logging instance. |
Method Summary |
ActionErrors |
validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Validate the properties that have been set from this HTTP request,
and return an ActionErrors object that encapsulates any
validation errors that have been found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
- Commons Logging instance.
ValidatorActionForm
public ValidatorActionForm()
validate
public ActionErrors validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Validate the properties that have been set from this HTTP request,
and return an
ActionErrors
object that encapsulates any
validation errors that have been found. If no errors are found, return
null
or an ActionErrors
object with no
recorded error messages.
- Overrides:
validate
in class ValidatorForm
- Parameters:
mapping
- The mapping used to select this instancerequest
- The servlet request we are processing
- Returns:
ActionErrors
object that encapsulates any validation errors
Copyright © 2000-2003 - Apache Software Foundation