Hacker News new | ask | show | jobs
by Cthulhu_ 1536 days ago
Yeah exactly, a phone number or credit card number may look like a number, but they're not. input type number will also discard leading zeroes, for example.

That said, I feel like the organizations behind HTML gave up too fast; they should have continued with input types for phone numbers (that e.g. phone manufacturers could then integrate with contacts without revealing anything to the website in question), credit card numbers (supporting all formats and with built-in format validation), etc. But they seem to have stopped 10+ years ago with HTML5's broken number input.

1 comments

Enumerating types might be cool for semantic web, but what I'd love as a dev is a system for enumerating valid characters, so I can put digits and dashes, or only Latin letters, and the device figures out the best keyboard to use