code: public static final boolean isValid(final String value) {
          if (value == null) {
              return true;
          }
          if ((value.length() < 3) || (value.length() > 20)) {
              return false;
          }
          return PATTERN.matcher(value.toString()).matches();
      }
docs: Check that a given string is a well-formed user id.
  
  @param value
  Value to check.
  
  @return Returns <code>true</code> if it's a valid user id else <code>false</code> is returned.