RE: [PHP] validation library?
| From: | Dan Joseph | Date: | Wed, 25 Jun 2003 13:31:06 +0000 |
| Subject: | RE: [PHP] validation library? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152766@lists.php.net to get a copy of this message | ||
Hi,
> Can any point me to a nice GNU php validation library?
> Looking for something thats strips bad user input and validates email,
> tel etc etc...
I don't have a link to a library, but, here's a function to validate e-mail
addresses:
if (!ereg ("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $_POST["email"])) {
$error = 1;
$msg .= "Invalid e-mail address.<br>";
}
-Dan Joseph