Created
September 2, 2022 09:23
-
-
Save sakshstore/7eb3ee9572d18f12f19ab437f7fe3b74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const validateEmail = (email) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email); | |
// Usage | |
validateEmail("[email protected]"); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment