validatePasswordREGX static method

bool validatePasswordREGX(
  1. String value
)

Implementation

static bool validatePasswordREGX(String value) {
  String pattern = r'^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$';
  RegExp regExp = new RegExp(pattern);
  bool result = regExp.hasMatch(value);
  return result;
}