nl.gx.webmanager.handler.forms
Interface Validator

All Superinterfaces:
FormComponent
All Known Implementing Classes:
AgeFormPartValidator, CountDbValidator, DateFormPartValidator, DateRangeFormPartValidator, DefaultProfileLoginValidator, DummyValidator, ElfCheckFormPartValidator, EqualFormPartValidator, FileSizeFormPartValidator, FloatFormPartValidator, FloatRangeFormPartValidator, IntFormPartValidator, IntRangeFormPartValidator, RegExpFormPartValidator, RequiredAtLeastOneValidator, RequiredFormPartValidator, RequiredOneOfManyValidator, VerificationCookieValidator

public interface Validator
extends FormComponent

This interface defines the api for the construction of a form validator component. The form handler framework calls the validate method of a validator to check the values submitted by a client. The resulting messages can be used for giving feedback to the client and determining the routing for the formflow.


Method Summary
 ValidatorMessage[] validate(FormDefinition form, State formState, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Performs validation on a form and returns an array of validator messages, containing errors detected in the submitted values.
 
Methods inherited from interface nl.gx.webmanager.handler.forms.FormComponent
init
 

Method Detail

validate

ValidatorMessage[] validate(FormDefinition form,
                            State formState,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
Performs validation on a form and returns an array of validator messages, containing errors detected in the submitted values.

Parameters:
form - The form that should be validated
formState - The object representing the state of the formflow. This object provides access to values submitted by the client and the exceptions and validator messages for the form.
req - The http servlet request
res - The http servlet response
Returns:
The array of validator messages, containing validation errors for the form.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.