primeng
primeng copied to clipboard
Restrict "money" pKeyFilter to only have one decimal
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
Currently the "money" pKeyFilter allows a user to enter multiple decimals. e.g. 123.456.789 is a valid "money" input.
Expected behavior
Only one decimal may be entered in a "money" pKeyFilter
What is the motivation / use case for changing the behavior?
This would restrict the "money" pKeyInput to valid money amounts
pKeyFilter does not validate the whole text, purpose of it as the name implies filtering the keystrokes, what you need is inputNumber.
https://github.com/primefaces/primeng/issues/1109