Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is the "tel" type a solution? According to the standard (https://html.spec.whatwg.org/multipage/input.html#telephone-...), it accepts every character except line feeds and carriage returns.

Without any pattern specified, the code you posted will accept emojis as input, it's not a good choice for a numeric only field. It's also intended for phone numbers...



Woops, for some reason I read the title as "Why the GOV.UK Design System team changed the input type for phone numbers" - removed my comment since it doesn't apply.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: