Package org.apache.struts2.validator

# Class ValidatorConfig

java.lang.Object
org.apache.struts2.util.location.Located
org.apache.struts2.validator.ValidatorConfig

All Implemented Interfaces:
  `Locatable`

public class ValidatorConfig extends Located
Holds the necessary information for configuring an instance of a Validator.

Author:
  James House, Rainer Hermanns, tm_jee, Martin Gilday

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `ValidatorConfig.Builder`
  Builds a ValidatorConfig

- ## Field Summary

  ### Fields inherited from class org.apache.struts2.util.location.Located

  `location`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ValidatorConfig(String validatorType)`
  `protected`
  `ValidatorConfig(ValidatorConfig orig)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDefaultMessage()`
  `String`
  `getMessageKey()`
  `String[]`
  `getMessageParams()`
  `Map<String,Object>`
  `getParams()`
  `String`
  `getType()`
  `boolean`
  `isShortCircuit()`

  ### Methods inherited from class org.apache.struts2.util.location.Located

  `getLocation, setLocation`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ValidatorConfig

    protected ValidatorConfig(String validatorType)
    Parameters:
      `validatorType` - validator type

  - ### ValidatorConfig

    protected ValidatorConfig(ValidatorConfig orig)

- ## Method Details

  - ### getDefaultMessage

    public String getDefaultMessage()
    Returns:
      Returns the defaultMessage for the validator.

  - ### getMessageKey

    public String getMessageKey()
    Returns:
      Returns the messageKey for the validator.

  - ### isShortCircuit

    public boolean isShortCircuit()
    Returns:
      Returns wether the shortCircuit flag should be set on the validator.

  - ### getParams

    public Map<String,Object> getParams()
    Returns:
      Returns the configured params to set on the validator.

  - ### getType

    public String getType()
    Returns:
      Returns the type of validator to configure.

  - ### getMessageParams

    public String[] getMessageParams()
    Returns:
      The i18n message parameters/arguments to be used.