Mark the link
It says that you can use:
<p:inputMask value="# {maskController.date}" mask="99/99/9999"/>
I have never used PrimeFaces before, but I used JSF. If you do not want to use javascript, you need to use the conversion tag inside the inputText tag.
<h:inputText id="money" required="true"> <f:convertNumber maxFractionDigits="2" groupingUsed="true" currencySymbol="$" maxIntegerDigits="4" type="currency"/> </h:inputText>
PD: RegEx is another option. RegEx means regular expression. This is a way to check if something like a string matches a rule. You can use in jsf with RegEx Validator.
source share