code: public static void checkName(String name, String constraints, String key, I_CmsMessageBundle bundle)
      throws CmsIllegalArgumentException {
  
          int l = name.length();
          for (int i = 0; i < l; i++) {
              char c = name.charAt(i);
              if (((c < 'a') || (c > 'z'))
                  && ((c < '0') || (c > '9'))
                  && ((c < 'A') || (c > 'Z'))
                  && (constraints.indexOf(c) < 0)) {
  
                  throw new CmsIllegalArgumentException(
                      bundle.container(key, new Object[] {name, new Character(c), new Integer(i), constraints}));
              }
          }
      }
docs: Checks if a given name is composed only of the characters <code>a...z,A...Z,0...9</code>
  and the provided <code>constraints</code>.<p>
  
  If the check fails, an Exception is generated. The provided bundle and key is
  used to generate the Exception. 4 parameters are passed to the Exception:<ol>
  <li>The <code>name</code>
  <li>The first illegal character found
  <li>The position where the illegal character was found
  <li>The <code>constraints</code></ol>
  
  @param name the name to check
  @param constraints the additional character constraints
  @param key the key to use for generating the Exception (if required)
  @param bundle the bundle to use for generating the Exception (if required)
  
  @throws CmsIllegalArgumentException if the check fails (generated from the given key and bundle)