Digit.range constructor

Digit.range(
  1. int min,
  2. int max, {
  3. String? mal,
  4. String? short,
  5. String? long,
})

Constrains the input data to the digits 0-9 and its length (number of digits) within the range min–max.

min the minimum number of digits; it must be > 0 and < max. max the maximum number of digits; it must be > 0 and > min. mal "malformed", the error message if non-digit characters are found; the default value is 'non-digit character(s) found'. short the error message if the input length is shorter than min digits. long the error message if the input length is longer than max digits.

Implementation

Digit.range(int min, int max, {String? mal, String? short, String? long})
    : assert(min > 0),
      assert(max > 0),
      assert(max > min),
      _valDig = _DigitImpl(
        mal,
        Len.range(min, max, short: short, long: long),
      );