usernameValidator static method
Implementation
static bool usernameValidator(String username) {
if (username != "" &&
username.contains(
r"^(?=.{8,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?<![_.])$")) {
return true;
}
return false;
}