Rafael Dohms 3d94cc6487 Update README.md
Updated composer installation instructions.
It now follows the recommendation of using the "require" command and letting Composer auto-define the latest version.
2014-10-22 14:29:38 +02:00
2014-05-04 18:53:31 +02:00
2014-03-24 13:25:47 +01:00
2014-01-12 18:13:13 +01:00
2014-09-16 23:20:11 +02:00
2014-02-13 11:51:06 +01:00
2014-10-22 14:29:38 +02:00

EmailValidator Build Status Coverage Status SensioLabsInsightScrutinizer Code Quality

##Installation##

Run the command below to install via Composer

composer require egulias/email-validator

##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

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

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