primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Restrict "money" pKeyFilter to only have one decimal

Open USLSRV opened this issue 7 years ago • 1 comments

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

USLSRV avatar May 29 '19 19:05 USLSRV

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

cagataycivici avatar Mar 25 '20 08:03 cagataycivici