When using a component we specify how to validate it with a required
, maxlength
or a validator
and those validation are enforced on the server which is great.
When using Primefaces inputMask
we can specify a mask. The mask lead us to think that the user input will always match this mask. Unfortunately this is not the case and we have to code a validator
to make sure that the user input will be the way we want it to be. So, unless I am missing something, the "client-side only" behavior of the inputMask
is just good enough to provide a hint to the user on how to fill a field.
Is there a generic validator
than can be paired with p:inputMask
to make sure that the user input is really matching the mask?