I have a question. My site generates email addresses for registered users. The email addresses look like this “John265Green@top.MYSITE.com” Can you please show me how to make email verification javascript for the following format
-
All entered email addresses must contain “@top.MYSITE.com”
-
The first part of the email address must be “(LETTERS)(3 Numbers)(LETTERS)@top.MYSITE.com”
Thanks in advance for the help guys. I truly appreciate it!
Below is the code I was using but want to be like this for when they enter their email address into the form. (LETTER)(3 NUMBERS)(LETTERS)@top.MYSITE.com
Can you adjust the code below?
function validateForm()
{
var x=document.forms["myForm"]["email"].value;
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
alert("Not a valid e-mail address");
return false;
}
}
This is very easy to do but no one is replying to this thread. I am only looking for an input form and script to validate that the input text is in this format “(LETTERS)(3 Numbers)(LETTERS)@top.MYSITE.com”
I will pay for the code and input form. Thanks!
That would be the following regular expression:
/[a-zA-Z]+\d{3}[a-zA-Z]+@top.MYSITE.com/
That would be the following regular expression:
/[a-zA-Z]+\d{3}[a-zA-Z]+@top.MYSITE.com/