notEmpty static method

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

when valid

  1. value is null
  2. value's length > 0

Implementation

static FormeValidator notEmpty({String errorText = ''}) {
  return (f, dynamic v) {
    if (v == null) {
      return errorText;
    }
    if (_getLength(v) == 0) {
      return errorText;
    }
    return null;
  };
}