Interface ValidatableElement

    • Method Detail

      • willValidate

        boolean willValidate()
        Returns:
        whether the element is a candidate for constraint validation
      • setCustomValidity

        void setCustomValidity​(java.lang.String message)
        Sets the custom validity message for the element to the specified message.
        Parameters:
        message - the new message
      • hasBadInputValidityState

        default boolean hasBadInputValidityState()
        Returns:
        a boolean value boolean value that is true if the user has provided input that the browser is unable to convert.
      • isCustomErrorValidityState

        boolean isCustomErrorValidityState()
        Returns:
        a boolean value indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method.
      • hasPatternMismatchValidityState

        default boolean hasPatternMismatchValidityState()
        Returns:
        true if the value does not match the specified pattern, and false if it does match. If true, the element matches the :invalid CSS pseudo-class
      • isStepMismatchValidityState

        default boolean isStepMismatchValidityState()
        Returns:
        true if the value does not fit the rules determined by the step attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule. If true, the element matches the :invalid and :out-of-range CSS pseudo-classes.
      • isTooLongValidityState

        default boolean isTooLongValidityState()
        Returns:
        true if the value is longer than the maximum length specified by the maxlength attribute, or false if it is shorter than or equal to the maximum. If true, the element matches the :invalid CSS pseudo-class
      • isTooShortValidityState

        default boolean isTooShortValidityState()
        Returns:
        true if the value is shorter than the minimum length specified by the minlength attribute, or false if it is greater than or equal to the minimum. If true, the element matches the :invalid CSS pseudo-class
      • hasTypeMismatchValidityState

        default boolean hasTypeMismatchValidityState()
        Returns:
        true if the value is not in the required syntax (when type is email or url), or false if the syntax is correct. If true, the element matches the :invalid CSS pseudo-class.
      • hasRangeOverflowValidityState

        default boolean hasRangeOverflowValidityState()
        Returns:
        true if the value is greater than the maximum specified by the max attribute, or false if it is less than or equal to the maximum. If true, the element matches the :invalid and :out-of-range CSS pseudo-classes.
      • hasRangeUnderflowValidityState

        default boolean hasRangeUnderflowValidityState()
        Returns:
        true if the value is less than the minimum specified by the min attribute, or false if it is greater than or equal to the minimum. If true, the element matches the :invalid and :out-of-range CSS pseudo-classes.
      • isValidValidityState

        boolean isValidValidityState()
        Returns:
        true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. If true, the element matches the :valid CSS pseudo-class; the :invalid CSS pseudo-class otherwise.
      • isValueMissingValidityState

        default boolean isValueMissingValidityState()
        Returns:
        true if the element has a required attribute, but no value, or false otherwise. If true, the element matches the :invalid CSS pseudo-class.