title: How to restrict an input to a variable amount of numbers only with PrimeFaces inputMask element
body: <p>I need to define something similar to this regex:</p>
  
  <pre><code>[0-9]{1, 5}
  </code></pre>
  
  <p>On a PrimeFaces <code>&lt;inputMask&gt;</code> element:</p>
  
  <pre><code>&lt;p:inputMask mask="regexGoesHere" value="#{someBean.val}"/&gt;
  </code></pre>
  
  <p>I looked at the PrimeFaces showcase, but I couldn't figure out how to do it.</p>
  
  <p>So does anyone know how to do it in any way besides JavaScript ?</p>
  
  <p>I'm not exactly looking for a solution with <code>&lt;inputMask&gt;</code> anything that would restrict me from typing letters in the input on the client side is OK.</p>
  
  <p>Thanks</p>