Email Validation Challenge

My post about validating an email using regular expression seem cause so many reaction. Rather than arguing, let’s figure out what the best solution to validate an email address. And everyone could learn in the process.

So, here the question. How you validate an email format?

So for I pick this one, but it is in PHP. Not a universal solution.

if (filter_var('test+email@fexample.com', FILTER_VALIDATE_EMAIL)) {
    echo "Your email is ok.";
} else {
    echo "Wrong email address format.";
}

Give your solution in the comment, and I’ll post the 10 best solutions. Do you have a better solution? Please don’t keep it in your treasure box.

Related posts:

  1. 10 Practical PHP Regular Expression Recipes

Comments are closed.

Additional comments powered by BackType