title: Primefaces Input for Money Input (exactly 2 digits after floating point)
body: <p>I need a PrimeFaces input component, to get/set an amount of cash, that means a Decimal with 2 digits after the floating point.</p>
  <p>I tried using inputMask, like</p>
  <pre><code>&lt;p:inputMask value=&quot;#{moneyBean.amount}&quot; mask=&quot;999.99&quot;/&gt;
  </code></pre>
  <p>But I can't find some way to set a mask that accepts:</p>
  <ol>
  <li><strong>1 or more</strong> arithmetic values before floating point</li>
  <li>Optionally, a floating point &quot;<strong>.</strong>&quot;</li>
  <li><strong>0 to 2</strong> arithmetic values after the floating point</li>
  </ol>
  <p>For Example, some valid inputs would be:</p>
  <ol>
  <li>1234.56</li>
  <li>1234.5</li>
  <li>2.8</li>
  <li>120</li>
  <li>120.00</li>
  </ol>
  <p>Any ideas to get this input in an efficient way?</p>