Return to Snippet

Revision: 61040
at November 23, 2012 22:39 by laxman2021


Initial Code
----------------------------------------------------------------------------------------------

function callEmailCheck() {
2
var emailreg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
3
//useremail is the name of the email text field.
4
var email = document.getElementById("useremail").value;
5
if(emailreg.test(email) == true){
6
return email;
7
}
8
return "";
9
}



-----------------------------------------------------------------------------------------------

Initial URL
http://katharnavas.wordpress.com/2009/10/20/email-validation-using-php-and-javascript/

Initial Description
This is a script for a validating Email.

Initial Title
Validating email

Initial Tags
email, php

Initial Language
PHP