What html5 form attribute should be used for a zipcode?

前端 未结 8 2025
我寻月下人不归
我寻月下人不归 2021-02-01 02:51

Is it best to use a \'text\' attribute with a limit on the number of characters, or can I use a number attribute in an input for a zipcode.

Just trying to get my head ar

8条回答
  •  梦毁少年i
    2021-02-01 03:30

    To allow ZIP+4:

    
    

    To be friendly to the user, this also permits whitespace before/after the string, which the developer will need to trim serverside.

提交回复
热议问题