2013-08-28 09:43:36 +02:00
2013-05-19 18:13:48 +02:00
2013-05-19 19:39:10 +03:00
2013-05-19 18:13:48 +02:00
2013-05-19 19:45:03 +02:00

EmailValidator Build Status

##Installation## Install via composer. Add to your current compooser.json require key: "egulias/email-validator":"1.0.*"

##Usage##

Simple example:

<?php

use egulias\EmailValidator\EmailValidator;

$validator = new EmailValidator;
if ($validator->isValid($email)) {
	echo $email . ' is a valid email address';
}

More advanced example (returns detailed diagnostic error codes):

<?php

use egulias\EmailValidator\EmailValidator;

$validator = new EmailValidator;
$email = 'dominic@sayers.cc';
$result = $validator->isValid($email);

if ($result) {
	echo $email . ' is a valid email address';
} else if ($validator->hasWarnings()) {
	echo 'Warning! ' . $email . ' has unusual/deprecated features (result code ' . var_export($validator->getWarnings(), true) . ')';
} else {
	echo $email . ' is not a valid email address (result code ' . $validator->getError() . ')';
}

##Contributors## As this is a port from another library and work, here are other people related to the previous:

  • Ricard Clau @ricardclau: Performance against PHP built-in filter_var
  • Josepf Bielawski @stloyd: For its first re-work of Dominic's lib
  • Dominic Sayers @dominicsayers: The original isemail function

##Licence## Released under the MIT Licence attached with this code.

S
Description
No description provided
Readme MIT 1.2 MiB
Languages
PHP 100%