com.holonplatform.core

## Interface Validator.Validatable<T>

- Type Parameters:
    `T` - Supported validators type
  All Known Subinterfaces:
    BeanProperty<T>, BeanProperty.Builder<T>, FunctionExpression.FunctionExpressionProperty<T>, FunctionExpression.PathFunctionExpressionProperty<P,T>, PathProperty<T>, PathProperty.PathPropertyBuilder<T>, Property<T>, VirtualProperty<T>, VirtualProperty.Builder<T,B>
  Enclosing interface:
    Validator<T>

      public static interface Validator.Validatable<T>

  Declares the support for value validation using `Validator`s.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<Validator<T>>` | `getValidators()` Get the registered validators.
    `default void` | `validate(T value)` Checks the validity of the given `value` against every registered validator, if any.

- - ### Method Detail

    - #### getValidators

          Collection<Validator<T>> getValidators()

      Get the registered validators.
      Returns:
        Registered validator, or an empty collection if none

    - #### validate

          default void validate(T value)
                         throws Validator.ValidationException

      Checks the validity of the given `value` against every registered validator, if any. If the value is not valid, an `Validator.ValidationException` is thrown.

      The `Validator.ValidationException` is `Localizable`, providing optional message code and arguments for validation message localization.

      Parameters:
        `value` - Value to validate
      Throws:
        `Validator.ValidationException` - If the value is not valid, providing the validation error message.

Copyright © 2017 The Holon Platform. All rights reserved.