io.vertx.rxjava3.ext.web.api.validation

## Class ParameterValidationRule

- java.lang.Object
- - io.vertx.rxjava3.ext.web.api.validation.ParameterValidationRule

-     public class ParameterValidationRule
      extends Object

  This function is an inner wrapper for ParameterTypeValidator inside ValidationHandler parameter maps. Don't instantiate this class, if you want to add custom ParameterTypeValidator to a parameter use functions in `HTTPRequestValidationHandler`

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<ParameterValidationRule>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParameterValidationRule(Object delegate)`
    `ParameterValidationRule(ParameterValidationRule delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `allowEmptyValue()` Deprecated.
    `boolean` | `equals(Object o)`
    `ParameterValidationRule` | `getDelegate()`
    `String` | `getName()` Deprecated.
    `int` | `hashCode()`
    `boolean` | `isOptional()` Deprecated.
    `static ParameterValidationRule` | `newInstance(ParameterValidationRule arg)`
    `ParameterTypeValidator` | `parameterTypeValidator()` Deprecated.
    `String` | `toString()`
    `RequestParameter` | `validateArrayParam(List<String> value)` Deprecated.
    `RequestParameter` | `validateSingleParam(String value)` Deprecated.

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<ParameterValidationRule> __TYPE_ARG

  - ### Constructor Detail

    - #### ParameterValidationRule

          public ParameterValidationRule(ParameterValidationRule delegate)

    - #### ParameterValidationRule

          public ParameterValidationRule(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public ParameterValidationRule getDelegate()

    - #### getName

          @Deprecated
          public String getName()

      Deprecated.
      This function return the name of the parameter expected into parameter lists
      Returns:
        name of the parameter

    - #### validateSingleParam

          @Deprecated
          public RequestParameter validateSingleParam(String value)

      Deprecated.
      This function will be called when there is only a string as parameter. It will throw a ValidationError in an error during validation occurs
      Parameters:
        `value` - list of values that will be validated
      Returns:

    - #### validateArrayParam

          @Deprecated
          public RequestParameter validateArrayParam(List<String> value)

      Deprecated.
      This function will be called when there is a List that need to be validated. It must check if array is expected or not. It will throw a ValidationError in an error during validation occurs
      Parameters:
        `value` - list of values that will be validated
      Returns:

    - #### isOptional

          @Deprecated
          public boolean isOptional()

      Deprecated.
      Return true if parameter is optional
      Returns:
        true if is optional, false otherwise

    - #### parameterTypeValidator

          @Deprecated
          public ParameterTypeValidator parameterTypeValidator()

      Deprecated.
      Return ParameterTypeValidator instance used inside this parameter validation rule
      Returns:

    - #### allowEmptyValue

          @Deprecated
          public boolean allowEmptyValue()

      Deprecated.
      allowEmptyValue is used in query, header, cookie and form parameters. This is its behaviour:
      1. During validation, the ValidationHandler check if there's a parameter with combination of location and name as defined in this rule
      2. If it not exists, It will check allowEmptyValue and if there's a default value set inside ParameterTypeValidator:
      - If this condition it's true, It marks as validated the parameter and returns the default value (inside RequestParameter)
      - If this condition it's false, It throws ValidationException
      3. If the parameter exists, It checks if parameter is null or empty string:
      - If allowEmptyValue it's true, It marks as validated the parameter and returns the default value if it exists (inside RequestParameter)
      - If allowEmptyValue it's false, It throws ValidationException
      Returns:
        value of allowEmptyValue

    - #### newInstance

          public static ParameterValidationRule newInstance(ParameterValidationRule arg)

Copyright © 2022 Eclipse. All rights reserved.