com.holonplatform.vaadin.components.builders

## Interface ValidatableInputBuilder<T,C extends ValidatableInput<T>>

- Type Parameters:
    `T` - Value type
    `C` - Concrete input type

      public interface ValidatableInputBuilder<T,C extends ValidatableInput<T>>

  `ValidatableInput` builder.
  Since:
    5.0.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `build()` Build the `ValidatableInput` instance.
    `ValidatableInputBuilder<T,C>` | `required()` Sets the `Input` as required.
    `ValidatableInputBuilder<T,C>` | `required(com.holonplatform.core.i18n.Localizable message)` Sets the `Input` as required, using given message as validation error message.
    `default ValidatableInputBuilder<T,C>` | `required(String message)` Sets the `Input` as required, using given message as validation error message.
    `default ValidatableInputBuilder<T,C>` | `required(String message, String messageCode, Object... arguments)` Sets the `Input` as required, using given message as validation error message.
    `ValidatableInputBuilder<T,C>` | `required(com.holonplatform.core.Validator<T> validator)` Set the `Input` as required, using given `Validator` to check the input value.
    `ValidatableInputBuilder<T,C>` | `validateOnValueChange(boolean validateOnValueChange)` Sets whether to validate the `Input` component value every time the `Input` value changes.
    `ValidatableInputBuilder<T,C>` | `validationStatusHandler(ValidationStatusHandler validationStatusHandler)` Set the `ValidationStatusHandler` to use to input validation status changes.
    `default ValidatableInputBuilder<T,C>` | `withVaadinValidator(com.vaadin.data.Validator<T> validator)` Adds a `Validator` to the `Input` bound to given `property`.
    `ValidatableInputBuilder<T,C>` | `withValidator(com.holonplatform.core.Validator<T> validator)` Adds a `Validator` to the `Input` bound to given `property`.

- - ### Method Detail

    - #### withValidator

          ValidatableInputBuilder<T,C> withValidator(com.holonplatform.core.Validator<T> validator)

      Adds a `Validator` to the `Input` bound to given `property`.
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### withVaadinValidator

          default ValidatableInputBuilder<T,C> withVaadinValidator(com.vaadin.data.Validator<T> validator)

      Adds a `Validator` to the `Input` bound to given `property`.
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### validationStatusHandler

          ValidatableInputBuilder<T,C> validationStatusHandler(ValidationStatusHandler validationStatusHandler)

      Set the `ValidationStatusHandler` to use to input validation status changes.
      Parameters:
        `validationStatusHandler` - the `ValidationStatusHandler` to set (not null)
      Returns:
        this

    - #### validateOnValueChange

          ValidatableInputBuilder<T,C> validateOnValueChange(boolean validateOnValueChange)

      Sets whether to validate the `Input` component value every time the `Input` value changes.

      Default is `true`.

      Parameters:
        `validateOnValueChange` - `true` to perform value validation every time the `Input` value changes, `false` if not
      Returns:
        this

    - #### required

          ValidatableInputBuilder<T,C> required()

      Sets the `Input` as required. Required inputs must filled by the user, and its validation will fail when empty.
      Returns:
        this

    - #### required

          ValidatableInputBuilder<T,C> required(com.holonplatform.core.Validator<T> validator)

      Set the `Input` as required, using given `Validator` to check the input value. Required inputs must filled by the user, and its validation will fail when empty.
      Parameters:
        `validator` - The `Validator` to use to check the required input value (not null)
      Returns:
        this

    - #### required

          ValidatableInputBuilder<T,C> required(com.holonplatform.core.i18n.Localizable message)

      Sets the `Input` as required, using given message as validation error message. Required inputs must filled by the user, and its validation will fail when empty.
      Parameters:
        `message` - The message to use to notify the required validation failure
      Returns:
        this

    - #### required

          default ValidatableInputBuilder<T,C> required(String message,
                                                        String messageCode,
                                                        Object... arguments)

      Sets the `Input` as required, using given message as validation error message. Required inputs must filled by the user, and its validation will fail when empty.
      Parameters:
        `message` - The default message to use to notify the required validation failure
        `messageCode` - The message localization code
        `arguments` - Optional message translation arguments
      Returns:
        this

    - #### required

          default ValidatableInputBuilder<T,C> required(String message)

      Sets the `Input` as required, using given message as validation error message. Required inputs must filled by the user, and its validation will fail when empty.
      Parameters:
        `message` - The default message to use to notify the required validation failure
      Returns:
        this

    - #### build

          C build()

      Build the `ValidatableInput` instance.
      Returns:
        the `ValidatableInput` instance

Copyright © 2019 The Holon Platform. All rights reserved.