Interface Validated

    • Method Detail

      • isValid

        boolean isValid()
      • isInvalid

        default boolean isInvalid()
      • validSecret

        static Validated.Secret validSecret​(java.lang.String property,
                                            java.lang.String value)
      • test

        static <T> Validated test​(java.lang.String property,
                                  java.lang.String message,
                                  @Nullable
                                  T value,
                                  java.util.function.Predicate<T> test)
        Validate that the Predicate will evaluate to 'true' on the supplied value. When the Predicate evaluates to 'false' the error message will be of the form:

        "[property] was '[value]' but it [message]"

        Type Parameters:
        T - The property value type.
        Parameters:
        property - The property name to test
        message - The failure message if the test doesn't pass
        value - The value of the property
        test - The test predicate
        Returns:
        A validation result