org.apache.struts.validator

Class ValidatorActionForm

Implemented Interfaces:
Serializable

public class ValidatorActionForm
extends ValidatorForm
implements 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.

Version:
$Revision: 1.6 $ $Date: 2002/10/18 01:35:02 $

Author:
David Winterfeldt

Since:
Struts 1.1

Field Summary

private static Log
log
Commons Logging instance.

Fields inherited from class org.apache.struts.validator.ValidatorForm

log, page, validatorResults

Fields inherited from class org.apache.struts.action.ActionForm

multipartRequestHandler, servlet

Method Summary

ActionErrors
validate(ActionMapping mapping, 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 org.apache.struts.validator.ValidatorForm

getPage, getResultValueMap, getValidatorResults, log, log, reset, setPage, setValidatorResults, validate

Methods inherited from class org.apache.struts.action.ActionForm

getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate

Field Details

log

private static Log log
Commons Logging instance.

Method Details

validate

public ActionErrors validate(ActionMapping mapping,
                             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 interface ValidatorForm

Parameters:
mapping - The mapping used to select this instance
request - The servlet request we are processing

Returns:
ActionErrors object that encapsulates any validation errors


Copyright B) 2000-2005 - Apache Software Foundation