Skip to content

Instantly share code, notes, and snippets.

View phaxadstudios's full-sized avatar
:octocat:
octocat

Nnamchi Israel phaxadstudios

:octocat:
octocat
View GitHub Profile
@cam-gists
cam-gists / validate.php
Created July 9, 2012 06:56
PHP: Regex Validation
<?php
// ref: http://komunitasweb.com/2009/03/10-practical-php-regular-expression-recipes/
// Validate Email
if (filter_var('test+email@fexample.com', FILTER_VALIDATE_EMAIL)) {
echo "Your email is ok.";
} else {
echo "Wrong email address format.";
}
//Validate Username