call method

String? call(
  1. String? text
)

Implementation

String? call(String? text) {
  if (text == null || text.isEmpty) return allowEmpty ? null : message;
  String s = trim ? text.trim() : text;
  if (s.length < minLength) return message;
  if (s.length > maxLength) return message;
  return null;
}