html,css,flexbox, javascript

Solution retrospective
there is an error in my javascript code that prevents my email addresses to be validated correctly, i couldn't figure out the error pls assist in fixing this issue.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @freaky4wrld
Hey there, buddy the regex you are using in your isvalid() function should be changed to this
const re = /^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/
, I think maybe that will do the trick for you, I'm not some regex master as well, refer to this article for detailsAlso I would recommend to validate this whole form using the built in js-validation API, that will be apt to look into at this phase of learning, trust me I'm also trying to be efficient with it, here's the link to it........
I hope it solves your problem buddy..............
Keep learning and coding
Marked as helpful
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