A regular expression can easily check whether a user entered something that looks like a valid email address.
Regular expressions are patterns used to match character combinations in strings.
I’ve intentionally kept it as easy, simple and lightweight as possible.
Just about any website or web application will require user input in one form or another.
Here is the code to validate email address in Java Script using regular expression.
You will probably need to give them information after they hit submit. They must check their email to do anything else, therefore it must be valid By the way, a lot of these things have nothing to do with Java Script I agree having a confirmation process would be a good idea.
(username, password, receipt info....) any of these things you could display on the "confirmation page" but why do that. Alot of sites will have the user click on a link in thier email before they are "offically confirmed".
On the final line we call test method for our regular expression and pass the email address as input.
If the input email address satisfies our regular expression, ‘test’ will return true otherwise it will return false. You can call this method whenever you want to validate email address.