isInRange function
Checks whether the given numeric value is within the range min
, max
(inclusive).
Implementation
IValidator isInRange(num min, num max) =>
isNumber() & isGte(min) & isLte(max) >
Expectation(
message: 'between $min and $max inclusive',
code: 'value.range_out_of_bounds',
data: {'operator': 'between_inclusive', 'min': min, 'max': max});