max<T> static method

FormeValidator<T> max<T>(
  1. double max, {
  2. String errorText = '',
})

when valid

  1. value is null
  2. value is <= max

Implementation

static FormeValidator<T> max<T>(double max, {String errorText = ''}) {
  return (f, dynamic v) => (v != null && v as num > max) ? errorText : null;
}