[Solved] Why won’t this accept email addresses with a hyphen after the @?
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 user … Read more