negativeOrZero static method

FormeValidator negativeOrZero({
  1. String errorText = '',
})

when valid

  1. value is null
  2. value <= 0

Implementation

static FormeValidator negativeOrZero({String errorText = ''}) {
  return (f, dynamic v) {
    if (v == null) {
      return null;
    }
    return v as num <= 0 ? null : errorText;
  };
}