Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It has to be a valid <a href="http://www.w3.org/TR/CSS2/syndata.html#characters" rel="nofollow noreferrer">CSS identifier</a> (the <code>ident</code> <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner" rel="nofollow noreferrer">here</a>) and there should be no duplicates.</p> <blockquote> <p>In CSS, identifiers (including element names, classes, and IDs in <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner" rel="nofollow noreferrer">selectors</a>) can contain only the characters <code>[a-zA-Z0-9]</code> and ISO 10646 characters <code>U+00A1</code> and higher, plus the hyphen (<code>-</code>) and the underscore (<code>_</code>); they cannot start with a digit, or a hyphen followed by a digit. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier <code>"B&amp;W?"</code> may be written as <code>"B\&amp;W\?"</code> or <code>"B\26 W\3F"</code>.</p> </blockquote> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/questions/2812072/allowed-characters-for-css-identifiers/2812097#2812097">Allowed characters for CSS identifiers</a></li> </ul> <hr> <p><strong>Update</strong>: for the case you're interested, here's the source code of the validator as provided by <code>UIComponentBase#validateId()</code>:</p> <pre><code>private static void validateId(String id) { if (id == null) { return; } int n = id.length(); if (n &lt; 1) { throw new IllegalArgumentException("Empty id attribute is not allowed"); } for (int i = 0; i &lt; n; i++) { char c = id.charAt(i); if (i == 0) { if (!Character.isLetter(c) &amp;&amp; (c != '_')) { throw new IllegalArgumentException(id); } } else { if (!Character.isLetter(c) &amp;&amp; !Character.isDigit(c) &amp;&amp; (c != '-') &amp;&amp; (c != '_')) { throw new IllegalArgumentException(id); } } } } </code></pre> <p>It's however a little more strict than the CSS rules. They cannot start with a hyphen as well.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload