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

后端 未结 1 832
深忆病人
深忆病人 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)
提交回复
热议问题