validateUsernameREGX static method

bool validateUsernameREGX(
  1. String value
)

Implementation

static bool validateUsernameREGX(String value) {
  String pattern =
      r'[!@#<>?":_`~;[\]\\|=+)(*&^%0-9-]';
  RegExp regExp = new RegExp(pattern);
  bool result = regExp.hasMatch(value);
  return result;
}