Interface IXValidationParams

    • Method Detail

      • getValues

        @Deprecated
        List<String[]> getValues()
        Deprecated.
        You should only validate the current element repetition, use getElementValues().
        Returns:
        The values that were submitted for this form item.
      • getElementValues

        String[] getElementValues()
        Returns:
        The values that were submitted for this form item, for the current getRepetitionIndex(). When not a repeated element, this returns the values for the element.
      • getRepetitionIndex

        int getRepetitionIndex()
        Returns:
        When the form field is a repeated element: the repetition index (which may neither start at 0 nor is it necessarily continuous) of the current repetition. When not a repeated element, this returns -1.
      • getOrdinalIndex

        int getOrdinalIndex()
        Returns:
        When the form field is a repeated element: the 0-based oridnal index of the current repetition. When not a repeated element, this returns -1.
      • getXItemPropertiesData

        IXItemPropertiesData getXItemPropertiesData()
        Returns:
        A wrapper object for accessing the properties (XPropertyEnum) of the form item to validate.
      • isItemAvailable

        boolean isItemAvailable()
        Gets whether the element is available, i.e. neither hidden due to a hidden-if condition and not unavailable due to a state or user group restriction.
        Returns:
        true if the item is available, false otherwise.
        Since:
        8.5.6
      • isItemEditable

        boolean isItemEditable()
        Gets whether the item is editable, i.e. neither read-only due to a read-only-if condition and not read-only due to a state or user group restriction.
        Returns:
        true if the item is editable, false otherwise.
        Since:
        8.5.6
      • isServerValidationEnabledForElement

        boolean isServerValidationEnabledForElement()
        Gets whether server-side validation is enabled for the element. Server-side validation can be enabled and disabled in the form designer for each element.
        Returns:
        true if server-side validation is enabled for the element, false otherwise.
        Since:
        8.5.6
      • isShouldValidate

        boolean isShouldValidate()
        Whether server-side validation should be performed. Server-validation may be disabled due to one of several reasons.

        For the form in general:

        • The form action does not require validation. When designing a form, the user can choose whether the form should be validated when a submit button is pressed. This returns true when a submit button was pressed that requires the form to be validated, and false.
        Additional reasons for particular form elements:
        • Server validation is disabled for the form element in the form designer.
        • The element is not rendered due to a state or user group condition.
        • The element is disabled due to a state or user group condition.
        • The element is hidden, e.g. due to a hidden-if condition.
        In general, no validation should be performed when this is false. However, there are some use cases when validation needs to be performed no matter the circumstances. In that case, this flag may be ignored.

        For more fine-grained control over whether validation should be performed, see:

        Specified by:
        isShouldValidate in interface IXBaseValidationParams
        Returns:
        Whether the form element should be validated.