There are no required external dependencies at all!
Having a-z and A-Z means that both lowercase and uppercase letters are allowed.indicates the minimum and maximum number of characters.There is also a Travis project used for testing, a Coveralls project used to code coverage as well as the annotated source.is an open source component of Wrapp and is licensed under the MIT license.I have borrowed the regex for verifying the correct email format from a different site. Please note that I have removed the action attribute because this is only a demo and we are only concerned with the client-side verification of the Java Script function.
Nothing exciting here except in line 6 where the on Click event is triggered when the user clicks on the button.
Here is the code to validate email address in Java Script using regular expression.
: Finally, the email address must end with two to four alphabets.
If the email addresses passes both these tests, then the function will return a true value.
The regex for validating the correct email format in line 2 has been borrowed and edited slightly by adding the i flag so that the regex is case-insensitive.
This event will launch the verify Email() Java Script function which will check the user input of the email address.