max static method

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

when valid

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

Implementation

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