Yes use the following

<script>
function checkForm(theForm) {
var emailRegex=/^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.-]?\w+)*(\.\w{2,})+$/;
if(document.forms[theForm.name].contactEmail.value.length==0||emailRegex.test(document.forms[theForm.name].contactEmail.value)==false)
{
alert('Please enter the email address!');
return false;
} else {
return true;
}
}
</script>
<form name="myForm" action="" method="post"
checkForm(this)">
...
</form>

Issac Rosa wrote:

> Does anyone know a good way to validate an email address prior to
> sending out the email?  The scenario is that I have a database of
> customers and want to send an email, but want to capture the email
> addresses that will bounce prior to sending the email.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to