Decimal Number fields don't allow ".00" anymore

panel
#1

Hello!
Another problem i found when upgrading from kirby v2 to kirby v3… It was possible to save prices by a number field with step: .01, such as 15.00 (€). In Kirby v3, the “.00” gets removed now. Of course, I could add the zeros programmatically, but it would be way cleaner to just let me prevent this behaviour. Any ideas?

#2

Sounds like a bug.

#3

there seem to be some tests in place but not for keeping zeros after the decimal dot (.00).

the number field calls toNumber

which calls Str::float()

maybe vues js Number type strips the trailing zeros?

#4

@bnomei Yep, too bad tests only test what you want them to test. They could really be more intelligent :wink: