http://coldfusion.com logo
Join Slack
Powered by
# prog-general
  • b

    Brian

    11/01/2022, 7:35 PM
    Does anyone else still use flowcharts? I don't use them for everything, but the more complex something is the more valuable I find them.
    j
    • 2
    • 1
  • e

    Evil Ware

    11/05/2022, 10:37 AM
    I see them used in sales pitches on PowerPoint presentations from time to time.
  • a

    Angelo Marras

    03/15/2023, 3:32 PM
    @Angelo Marras has left the channel
  • b

    Brian

    06/11/2025, 2:31 PM
    This is really a UX question, but I figured, what the heck. I'm building a form where the user needs to enter a dollar amount. The programmer side of me wants to only allow them to enter digits and give them an error otherwise. The UX side of me wants to let them enter currency symbols, commas, periods, etc. and just round any decimals and the strip away anything that's not a number. However, that last bit seems like it might be fraught with peril. Is there a safe way to let them enter things other than digits and strip the rest away?
  • r

    rodyon

    06/11/2025, 4:46 PM
    I'd give option to enter only $, 0-9 and a dot. Convert comma to dot silently, if someone from Europe tries to enter dollar amount 🙂 I'd not allow anything else to be entered, clean with JS validation and check on server side as well of course 🙂
  • j

    jfrobishow

    06/12/2025, 6:02 PM
    That is risky without properly localizing it (if you have an international user base). Quite a few country use the . as a thousand separator. 1.000,99 what then? We usually try to handle it only as numbers as much as possible and handle the currency symbol ourselves by outputting it next to the input. if you are comfortable forcing users to enter it in a "English" format you can validate it with a regex [,0-9]+(\.[0-9]+)? From there you can safely strip any comma from the value.