code: private static String checkUsername(String username) {
          if (username.length() < 3) {
              return "too short (minimum: 3 characters)";
          } else if (username.length() > 64) {
              return "too long (maximum: 64 characters)";
          }
  
          for (int i = 0; i < username.length(); i++) {
              char c = username.charAt(i);
              if (c >= 'A' && c <= 'Z') continue;
              if (c >= 'a' && c <= 'z') continue;
              if (c >= '0' && c <= '9') continue;
              if (c == '_') continue;
              return "invalid character at position " + (i+1) + ": " + jq(""+c);
          }
  
          return null;
      }
docs: Returns 'null' if the username is ok.