MaxRule<T> constructor

MaxRule<T>(
  1. num max, {
  2. MaxRuleError? stringError,
  3. MaxRuleError? numberError,
  4. MaxRuleError? listError,
})

Implementation

MaxRule(
  this.max, {
  MaxRuleError? stringError,
  MaxRuleError? numberError,
  MaxRuleError? listError,
})  : _stringError = stringError ?? MaxRuleError.string(max.toInt()),
      _numberError = numberError ?? MaxRuleError.number(max.toInt()),
      _listError = listError ?? MaxRuleError.list(max.toInt());