jQuery Email Regex

前端 未结 2 1993
轻奢々
轻奢々 2020-12-11 23:08

I have been developing a script and I\'m stumped right now. I have tried many different Regex from Google and non have worked, this is my code:

$(document).r         


        
相关标签:
2条回答
  • 2020-12-11 23:50

    Set the case insensitive flag (i):

    var email_check = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i;
    
    0 讨论(0)
  • 2020-12-11 23:56

    You could skip writing the regex and use the jQuery validation plugin for this task. There's an example here of validating an email address.

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