isValid static method
Implementation
static bool isValid(
String? value, {
int minLength = 6,
int maxLength = 20,
RegExp? pattern,
}) {
bool a = value != null && value.isNotEmpty && value.toLowerCase() != "null";
bool b = maxLength <= 0 ? a : a && value.length <= maxLength;
bool c = b && value.length >= minLength;
bool d = pattern != null ? pattern.hasMatch(value ?? '') : c;
return d;
}