Last active
April 6, 2025 06:17
-
-
Save stebunovd/5c971eb955b76fed7d988abe4c6b04bf to your computer and use it in GitHub Desktop.
sample email validation function
This file contains 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
function isValidEmail(email: string): boolean { | |
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | |
return emailRegex.test(email); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment