ReqLen.range constructor

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

Constrains the length (number of items) within the range min–max.

min the lower limit; it must be > 0 and < max. max the upper limit; it must be > 0 and > min. blank the error message in case of a null or empty input value. short the error message if the length < min. long the error message if the length > max.

Implementation

ReqLen.range(int min, int max, {String? blank, String? short, String? long})
    : _reqLenVal = Pair(
        Req(blank: blank),
        Len.range(min, max, short: short, long: long),
      );