Jump to content

[SOLVED] validate an email form text filed


monkeybidz

Recommended Posts

this will check if is a valid syntax, but your need to email them to see if the email is their valid email, or check the domain to see if its a valid domain..

 

 

<?php
if ( !preg_match('/^\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b$/i', $email_address) )
{
$msg[] = $error12;
}
?>

 

EDIT:

'[email protected]' = valid (without quotes)

'[email protected] ' = invalid (without quotes) (note the space at the end

'' = invalid

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.