Validate Multiple Email Addresses with HTML5

前端 未结 3 1170
你的背包
你的背包 2021-02-15 14:06

I\'m trying to construct an email form that takes multiple comma separated emails as an input and verifies them using HTML5. I want to use the following regex to sanity check t

3条回答
  •  你的背包
    2021-02-15 14:26

    Try this:

    
    

    Update:

    Using does seem to be bugged by letting "a@b" pass. Though I would go with this method to keep the semantics as you said, and simply use validation on the server side as well just in case someone tries to submit an email like "a@b".

    Just as a note, you should always validate on the server side for security reasons anyway, as client side validation can be bypassed very easily.

提交回复
热议问题