org.appng.api

## Interface FormValidator

-     public interface FormValidator

  Interface that can be implemented by an `ActionProvider` or the formBean that is used by an `ActionProvider` . A `FormValidator` is used for contextual validation, e.g. to verify that one value is greater than the other or that two given passwords match. For all other basic validations, use JSR-380 (Bean Validtion 2.0) annotations.
  The `validate()`-method is being called before the `ActionProvider`s `perform`-method. Only if there are no errors (see `FieldProcessor.hasErrors()`), the `ActionProvider` is being actually called.
  Author:
    Matthias Müller
  See Also:
    `ActionProvider.perform(Site, Application, Environment, Options, Request, Object, FieldProcessor)`, `FieldProcessor.hasErrors()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `validate(Site site, Application application, Environment environment, Options options, Request request, FieldProcessor fieldProcessor)` This method validates the given `Request` and eventually adds some `Message`s to the `FieldProcessor` using one of its `addErrorMessage()`-methods.

- - ### Method Detail

    - #### validate

          void validate(Site site,
                        Application application,
                        Environment environment,
                        Options options,
                        Request request,
                        FieldProcessor fieldProcessor)

      This method validates the given `Request` and eventually adds some `Message`s to the `FieldProcessor` using one of its `addErrorMessage()`-methods.
      Parameters:
        `site` - the current `Site`
        `application` - the current `Application`
        `environment` - the current `Environment`
        `options` - the `Options` for this `DataProvider`
        `request` - the current `Request`
        `fieldProcessor` - the `FieldProcessor` containing all readable `FieldDef`initions for the DataProvider
      See Also:
        `FieldProcessor.addErrorMessage(String)`, `FieldProcessor.addErrorMessage(FieldDef, String)`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.