Submitted 4 months ago
Newsletter Sign-Up Form with Javascript form validation
@samuel-adu
Design comparison
SolutionDesign
Community feedback
- @geomydasPosted 4 months ago
nice!
0@samuel-aduPosted 4 months ago@geomydas thank you for your feedback, I've done that now, let me know what you think.
0@geomydasPosted 4 months ago@samuel-adu the background is all good now but you have some slight problem with the form validation. i havent read your code yet but you can type any@text without the .domain and it still works.
So lets say you have [email protected], you type test@gmail and it will still work
0@samuel-aduPosted 4 months ago@geomydas it's the email validation regex. I was using
^\S+@\S+$/g
but I've changed it to
/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]/
0
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