Drupal investigation

HSA Test User c16dcac362 User import 7 gadi atpakaļ
..
src c16dcac362 User import 7 gadi atpakaļ
.coveralls.yml c16dcac362 User import 7 gadi atpakaļ
.gitignore c16dcac362 User import 7 gadi atpakaļ
.travis.yml c16dcac362 User import 7 gadi atpakaļ
LICENSE c16dcac362 User import 7 gadi atpakaļ
README.md c16dcac362 User import 7 gadi atpakaļ
composer.json c16dcac362 User import 7 gadi atpakaļ
composer.lock c16dcac362 User import 7 gadi atpakaļ
phpunit.xml.dist c16dcac362 User import 7 gadi atpakaļ

README.md

#EmailValidator

Build Status Coverage Status Scrutinizer Code Quality SensioLabsInsight

With the help of

Powered by PhpStorm ##Installation##

Run the command below to install via Composer

composer require egulias/email-validator "~1.2"

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