Return to Snippet

Revision: 10593
at January 5, 2009 09:58 by sveggiani


Initial Code
// name:		evValidEmail
// version:		v0.1
// description:		chequea que sea un email valido

function evValidEmail( $email ) {

	if ( !eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email ) ) :  return true;
	else: return false;
	endif;

}

Initial URL


Initial Description
only checks if the string contains @, . and alphanumeric characters

Initial Title
evValidEmail | checks if a given string is a valid e-mail address

Initial Tags


Initial Language
PHP