Submitted over 1 year ago
Intro component with sign-up form validation using JavaScript & HTML
@andrearecuyo
Design comparison
SolutionDesign
Solution retrospective
Working with this challenge, I have learned how to create a basic form validation system using JavaScript, HTML, and CSS.
I used regular expressions to validate email addresses and display specific error messages.
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/;
What other ways to validate email that covers many test cases? I am open to any alternative solution for email validation, thank you!
Community feedback
- @immdipuPosted over 1 year ago
Regex is best for email validation. There are npm package you can but i think Regex is good.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord