Skip to content

Instantly share code, notes, and snippets.

@UmairJibran
Created September 16, 2022 19:32
Show Gist options
  • Select an option

  • Save UmairJibran/7054572f8676ed143b95da1988753df2 to your computer and use it in GitHub Desktop.

Select an option

Save UmairJibran/7054572f8676ed143b95da1988753df2 to your computer and use it in GitHub Desktop.
const isValidEmail = (email) => {
return String(email)
.toLowerCase()
.match(
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment