Interface BaseConstraint
-
- All Known Subinterfaces:
Field
,NumberAndDateConstraint
,StringConstraint
,TextInput
@ConsumerType public interface BaseConstraint
A base interface which specifies the different form field constraints- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BaseConstraint.Type
Defines the data type.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @Nullable java.lang.String
getFormat()
Returns the format of the form field as specified in the json schema specification(for example, date, binary etc)default BaseConstraint.Type
getType()
Returns the data type of the form field.default @Nullable java.lang.String
getValidationExpression()
Returns an expression returning boolean value indicating whether the value in the field is valid or notdefault boolean
isRequired()
Returnstrue
if field is required, otherwisefalse
.
-
-
-
Method Detail
-
isRequired
default boolean isRequired()
Returnstrue
if field is required, otherwisefalse
.- Returns:
true
if field is required, otherwisefalse
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
getType
default BaseConstraint.Type getType()
Returns the data type of the form field.- Returns:
- the data type of the form field
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
getFormat
@Nullable default @Nullable java.lang.String getFormat()
Returns the format of the form field as specified in the json schema specification(for example, date, binary etc)- Returns:
- the format of the form field
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
getValidationExpression
@Nullable default @Nullable java.lang.String getValidationExpression()
Returns an expression returning boolean value indicating whether the value in the field is valid or not- Returns:
- an expression
- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
-