Input type='number' new validation removes leading zeros and formats number in Safari for iPhone iOS5 and latest Safari for Mac

后端 未结 1 826
深忆病人
深忆病人 2021-01-18 03:32

The latest Safari for MacOS and the one that comes in iOS5 has some extra validation that causes problems if the text field is not a phone number.

Case: Input text f

相关标签:
1条回答
  • 2021-01-18 03:49

    I change type="number" to type="tel" and works fine. I did some quick testing and have not found any validation or auto-formatting of the text either.

    0 讨论(0)
提交回复
热议问题