beWithin method
Instructs NumberMust to make sure the given number
is within the range min and max, both end inclusive.
Implementation
void beWithin(num min, num max, [String? errorMessage]) {
_validators.add((value) {
if (value == null || value < min || value > max)
return errorMessage ?? 'Number is not within $min and $max';
return '';
});
}