Re:HTML Form Validation is heavily underused
by francislavoie on Tuesday October 29, 2024 @03:08AM
(#41980211)
"Break your UX" is a vast exaggeration. I'm not talking about phone number fields, to be clear. I'm talking about like numeric amounts, with maybe a negative or decimal point. It's literally just [0-9\.-] but that still requires JS to limit inputs to that.
[ Parent
| on HN ]
Re:HTML Form Validation is heavily underused
by HappMacDonald on Tuesday October 29, 2024 @07:54AM
(#41982943)
What's wrong with
<input type="text" pattern="[0-9.-]*">
though?
Re:HTML Form Validation is heavily underused
by francislavoie on Tuesday October 29, 2024 @08:15AM
(#41983092)
It doesn't prevent the bad input, it only validates it on submission.