Interface OptionsConstraint
-
@ConsumerType public interface OptionsConstraint
Interface for options constraints (for radio button, check box and drop down type of fields)- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String[]
enumNames()
Returns a user friendly text to display for the possible options to be shown to the end user.java.lang.Object[]
enums()
Returns a list of options to put restrictions on the possible values of the field.default boolean
isEnforceEnum()
Returnstrue
if enforceEnum is set, otherwisefalse
.
-
-
-
Method Detail
-
isEnforceEnum
default boolean isEnforceEnum()
Returnstrue
if enforceEnum is set, otherwisefalse
. Whether a user can enter a value that is not present in the enum array. If set to true, a user will be able to enter any other value that is not in the list of enum. That generally means that enum is used a aid for users to enter the value but is not a validation constraint. The constraint is applicable only if the enum property is defined on the Field- Returns:
true
if enforceEnum is set, otherwisefalse
.- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
enums
java.lang.Object[] enums()
Returns a list of options to put restrictions on the possible values of the field. The type of values in the enum array must match the value of the type property defined in the field.- Returns:
- the list of enum
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
enumNames
java.lang.String[] enumNames()
Returns a user friendly text to display for the possible options to be shown to the end user. The length of enum and enumNames array must match- Returns:
- the list of enum names
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
-