hasMinimumLowercase method

bool hasMinimumLowercase(
  1. String password,
  2. int lowercaseCount
)

Implementation

bool hasMinimumLowercase(String password, int lowercaseCount) {
  String pattern = '^(.*?[a-z]){' + lowercaseCount.toString() + ',}';
  return password.contains(RegExp(pattern));
}