Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Intro component with sign-up form validation using JavaScript & HTML

@andrearecuyo

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

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

Dipu 430

@immdipu

Posted

Regex is best for email validation. There are npm package you can but i think Regex is good.

1

@andrearecuyo

Posted

@immdipu Thank you for your insights!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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