I have an p:inputMask
with a p:keyFilter
to match HH:MM
as following:
p:keyFilter
versus f:validateRegex
p:keyFilter
is used to filter characters (on each key stroke), it does not allow you to validate an expression (on the complete inputted value). If you want to validate if your input matches a regular expression use f:validateRegex
.
So, in your case:
You could ajaxify it to show a message on change:
You could have a look at pe:timePicker. This component is made for what you are trying to "hack" here.