Posted By

ajbatac on 01/11/08


Tagged

email validation


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

vali29
vilebender
soroush
kdaviesnz
JimiJay


Valid email address


 / Published in: PHP
 

  1. function valid_email($str)
  2. {
  3. return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
  4. }

Report this snippet  

You need to login to post a comment.