Skip to content

24 ways to impress your friends

Vote up?


What Vadim said. Think of type=“number” as type=“integer” or type=“float” — an HTML5 compliant browser will strip leading zeros and may even reformat the number, so if you type in “012300”, it can get sent to the server as “1.23e+4”.

Not to mention that a spin button widget looks really silly for a credit card field. :-)

If you want validation of the credit card field, use pattern=”“.