note 83446 added to function.preg-match

From: Date: Mon, 26 May 2008 19:50:00 +0000
Subject: note 83446 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-139817@lists.php.net to get a copy of this message
Because making a truly correct email validation function is harder than one may think, consider using this one which comes with PHP through the filter_var function (http://www.php.net/manual/en/function.filter-var.php): <?php $email = "someone@domain .local"; if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "E-mail is not valid"; } else { echo "E-mail is valid"; } ?> ---- Server IP: 195.221.21.36 Probable Submitter: 82.124.245.77 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/83446 Del: integrated -- https://master.php.net/note/delete/83446/integrated Del: useless -- https://master.php.net/note/delete/83446/useless Del: bad code -- https://master.php.net/note/delete/83446/bad+code Del: spam -- https://master.php.net/note/delete/83446/spam Del: non-english -- https://master.php.net/note/delete/83446/non-english Del: in docs -- https://master.php.net/note/delete/83446/in+docs Del: other reasons-- https://master.php.net/note/delete/83446 Reject -- https://master.php.net/note/reject/83446 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139817) next »