nonempty method

JarString nonempty([
  1. String? message
])

Implementation

JarString nonempty([String? message]) {
  return addValidator((value) {
    if (value == null) return null;
    return value.isNotEmpty ? null : (message ?? 'Must not be empty');
  }, 'too_short');
}