[Solved] Why won’t this accept email addresses with a hyphen after the @?
[ad_1] Try this: var emailpat = /^[^@]+@[^@]+\.[^@\.]{2,}$/; Email addresses should have just one @-sign, and that can’t be the first character. After the @ you’ll need at least one dot followed by 2 or more letters. And yes, this also accepts email addresses that are not valid. If you want to be sure that the … Read more