When I use PrimeFaces keyfilter with regexp /[0-9]/ when I test in my application I saw that I can put values like ! " # $ % &, other values like * { or A-Z are not allowed
My code is like this:
<p:inputText maxlength="5" value="#{myController.inputValue}" >
<p:keyFilter regEx="/[0-9]/" preventPaste="false" />
</p:inputText>
Note: This affects Firefox but works well in Chrome.
[0-9]has nothing to do with those punctuations. But if the filter is chars that are not[0-9]then it does. Will it let digits in the field ? Otherwise, it's a usage problem that you don't give enough information about. - user557597