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