3 ms·
I learned a general rule about numbers vs strings, and I think it’d apply in this example as well: if you aren’t doing math with it, keep it a string. (Phone nu
by EADGBE 8y ago
I learned a general rule about numbers vs strings, and I think it’d apply in this example as well: if you aren’t doing math with it, keep it a string. (Phone numbers, numeric postal codes, account numbers, house numbers, etc).
- beatgammit 8y agoAnd if there's only 10 or so reasonable/acceptable options, it should probably just be a menu instead.
- zhte415 8y agoWhat led you to that general rule?
- scarejunba 8y agoDon’t leak your data model, though. Having mobile users have the number pad pop up is absolutely the right answer. Treating it as a generic string is an incredibly annoying UX failure. The fact that spinwheels by default on this thing is another UX failure.