Skip to main content
Version: 0.6.0

RangeConstraint

Compatible value type: decimal

Description

Limits the range of a number value with an upper and/or lower boundary which can be inclusive or exclusive. Only values within the given range are considered valid.

Example 1

 publish constraint HundredScale oftype RangeConstraint {
lowerBound: 1;
upperBound: 100;
}

A scale between (and including) 1 and 100.

Example 2

 publish constraint HundredScale oftype RangeConstraint {
lowerBound: 1;
lowerBoundInclusive: false;
upperBound: 100;
}

A scale for numbers strictly larger than 1 and less or equal to 100.

Properties

lowerBound

Type decimal

Default: -9007199254740991

lowerBoundInclusive

Type boolean

Default: true

upperBound

Type decimal

Default: 9007199254740991

upperBoundInclusive

Type boolean

Default: true