public interface ConstraintOnNull extends JavaBeanVersion
Any implementation of this interface must also implement the Constraint
interface.
As such, its data model declaration and its life cycle are the same as
Constraint
.
As this interface serves as a restriction of the static data model constraint
minOccurs
, the
method checkNull(ValueContextForValidation)
is only called under the following conditions:
Data model definition | Perform checkNull() |
minOccurs="0" and maxOccurs="1" |
If no value is defined (null ) and the dataset is activated |
minOccurs > 0 |
No |
maxOccurs > 1 |
No |
NOTE:
By default, constraints on null value are not checked on user input.
In order to enable this check, the osd:checkNullInput
property must be set and if the element is terminal, the dataset must also be
activated.
Constraint
,
JavaBeanVersion.getBeanVersion()
Modifier and Type | Method and Description |
---|---|
void |
checkNull(ValueContextForValidation aValidationContext)
This method performs a check when no value is defined; adds
error message if necessary.
|
getBeanVersion
void checkNull(ValueContextForValidation aValidationContext) throws InvalidSchemaException
aValidationContext
- the contextInvalidSchemaException
- if a dynamic condition in the data model prevents the execution of this method.