newsletter sign up form using html, css , javascript and DOM
Design comparison
Solution retrospective
what is the standard regex for email or is there any ?
Community feedback
- @Jo-cloud85Posted over 1 year ago
Hi Izundu,
Firstly, you are using the wrong project to submit your solution for the Newsletter.
Pertaining to your question, there is no 100% 'standard' format per se as you can slightly customize it as to which characters you want to exclude in an email.
But typically if you want to validate an email that does not have these characters: ! # $ % & ‘ * + – / = ? ^ ` . { | } ~
This is the regex for email: /^\w+([.-]?\w+)@\w+([.-]?\w+)(.\w{2,3})+$/
And here's one application from w3:
function ValidateEmail(mail) { if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value)) {return (true)} alert("You have entered an invalid email address!") return (false) }
Here's the link if you want to read it in detail:
https://www.w3resource.com/javascript/form/email-validation.php#:~:text=To%20get%20a%20valid%20email,%2Frfc3696%23page%2D5%20!
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