HTML::...::Money(3pm)

πŸ“¦
version 0.40068 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

πŸ’Έ NAME πŸ’Έ

Okay bestie, so this is HTML::FormHandler::Field::Money β€” and it's literally the field that handles US currency-like values. Money bag energy only. πŸŽ€

✨ VERSION ✨

This one's running version 0.40068. Iconic, no cap. πŸ‘‘

πŸ€‘ DESCRIPTION πŸ€‘

So what it does is validate that you entered a positive or negative real value β€” yes, negatives are allowed, this field is not here to judge your spending habits 😭. Then it formats the whole thing with exactly two decimal places. Fancy.

It uses a period for the decimal point (like 1.50, not 1,50 β€” sorry European besties, that's just how it is πŸ’…). Widget type is 'text'.

And here's the cute part β€” if the form has the 'is_html5' flag active, it'll render this instead:

<input type="number" ... />

...instead of type="text". Glow-up fr fr. 🌈


πŸ¦‹ ATTRIBUTES πŸ¦‹

πŸ’– currency_symbol

This is the currency symbol it removes from the start of the input, if it finds one. Default is the dollar sign "$". So like, if someone types $5.00 it's gonna strip that $ off the front and be like "okay we're so good". 🫢

🌸 allow_commas

Do you wanna allow commas in the input for digit grouping? It groups digits into groups of 3, for example "1,000,000,000". Big money behavior honestly. Defaults to false β€” so commas are not allowed unless you turn this on. ⭐


πŸ‘‘ AUTHOR πŸ‘‘

FormHandler Contributors β€” see HTML::FormHandler. Shoutout to the whole crew, they ate. πŸ”₯

This software is copyright (c) 2017 by Gerda Shank. πŸ’–

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. So yes, it's giving generous icon energy 🧚 β€” go forth and remix, just keep those same terms.


Okay that's the whole page bestie, go build something cute with it πŸ’…βœ¨

And that's a wrap! This beauty of a page came from perl v5.34.0, dated 2022-03-25 β€” iykyk πŸŒΈπŸ“

πŸ“¦ where this page comes from