title: validating decimals inputs in JSF
body: <p>I want to validate an input as an integer. Thus, any value with decimal fractions should be filtered. But I don't know how to achieve that. I have tried many things, but with the code below, if the input is "61.2", the value is converted to 61, just truncating decimal part. But I want to force a validation error. I am sure I can do it without a custom validator. Thanks</p>
  
  <pre><code>&lt;p:inputText size="5" value="#{bean.intValue}"  converter="#{Integer}"&gt;
      &lt;f:convertNumber pattern="#0" integerOnly="true" maxFractionDigits="0"/&gt;
  &lt;/p:inputText&gt;
  </code></pre>