ReqDigit.len constructor

ReqDigit.len(
  1. int len, {
  2. String? blank,
  3. String? mal,
  4. String? diff,
})

Constrains the input data to the digits 0-9 and its length (number of digits) to len digits.

len the number of digits; it must be > 0. blank the error message in case of a null or empty input value. mal the error message if a non-digit character is found. diff the error message if the number of digits is different from len.

Implementation

ReqDigit.len(int len, {String? blank, String? mal, String? diff})
    : this._dig(Digit.len(len, mal: mal, diff: diff), blank);