notNull static method

Validator<Object?> notNull({
  1. String? error,
})

Implementation

static Validator<Object?> notNull({String? error}) => (value, context) {
      if (value != null) return (true, null);
      return (false, error ?? context.errors.generalErrors.notNull());
    };