DEV Community

Discussion on: How to validate an email address in JavaScript

berslucas profile image
Lucas Bersier

You could also use <input type="email"> if you're targeting not-edge.

I always jump to the RFC-5322 standard regex (, but the above seems smaller and less complicated for most projects that don't need to 100% cover all cases.

seraphicrav profile image
Ravaka Razafimanantsoa

This regular expression does not validate the new top level domains such as https://はじめよう.みんな/index.html

mogery profile image
Gergő Móricz

You can use u at the end to do unicode validation too IIRC.