hasMinimumUppercase static method
Checks if the password has a minimum number of uppercase characters.
Returns true if the password contains at least uppercaseCount uppercase characters,
otherwise returns false.
Implementation
static bool hasMinimumUppercase(String password, int uppercaseCount) {
String pattern = '^(.*?[A-Z]){$uppercaseCount,}';
return password.contains(RegExp(pattern));
}