Prashant Ingale

Juice of PHP, MySQL, Apache, Linux, Actionscript, Flex

Email address validation - javascript

leave a comment

Below is simple yet powerful email validation script using regular expression.

function validateEmail(myEamil) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myEmail.value)){
		return (1)
	}
	return (0)
}

Written by admin

August 27th, 2008 at 1:09 am

Leave a Reply

You must be logged in to post a comment.