2017 © Pedro Peláez
 

library email-validator

A library for validating emails against several RFCs

image

egulias/email-validator

A library for validating emails against several RFCs

  • Tuesday, April 10, 2018
  • by egulias
  • Repository
  • 22 Watchers
  • 3721 Stars
  • 17,790,659 Installations
  • PHP
  • 85 Dependents
  • 9 Suggesters
  • 64 Forks
  • 18 Open issues
  • 37 Versions
  • 22 % Grown

The README.md

EmailValidator

Build Status Coverage Status Scrutinizer Code Quality SensioLabsInsight, (*1)

Supported RFCs

This library aims to support:, (*2)

RFC 5321, 5322, 6530, 6531, 6532., (*3)

Requirements

Installation

Run the command below to install via Composer, (*4)

composer require egulias/email-validator

Getting Started

EmailValidatorrequires you to decide which (or combination of them) validation/s strategy/ies you'd like to follow for each validation., (*5)

A basic example with the RFC validation, (*6)

<?php

use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\RFCValidation;

$validator = new EmailValidator();
$validator->isValid("example@example.com", new RFCValidation()); //true

Available validations

  1. RFCValidation: Standard RFC-like email validation.
  2. NoRFCWarningsValidation: RFC-like validation that will fail when warnings* are found.
  3. DNSCheckValidation: Will check if there are DNS records that signal that the server accepts emails. This does not entails that the email exists.
  4. SpoofCheckValidation: Will check for multi-utf-8 chars that can signal an erroneous email name.
  5. MultipleValidationWithAnd: It is a validation that operates over other validations performing a logical and (&&) over the result of each validation.
  6. Your own validation: You can extend the library behaviour by implementing your own validations.

*warnings: Warnings are deviations from the RFC that in a broader interpretation are acceptded., (*7)

<?php

use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\DNSCheckValidation;
use Egulias\EmailValidator\Validation\MultipleValidationWithAnd;
use Egulias\EmailValidator\Validation\RFCValidation;

$validator = new EmailValidator();
$multipleValidations = new MultipleValidationWithAnd([
    new RFCValidation(),
    new DNSCheckValidation()
]);
//ietf.org has MX records signaling a server with email capabilites
$validator->isValid("example@ietf.org", $multipleValidations); //true

How to extend

It's easy! You just need to implement EmailValidation and you can use your own validation., (*8)

Other Contributors

(You can find current contributors here), (*9)

As this is a port from another library and work, here are other people related to the previous one:, (*10)

  • 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., (*11)

The Versions

10/04 2018

dev-master

9999999-dev https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

10/04 2018

2.1.4

2.1.4.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

16/11 2017

2.1.3

2.1.3.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

03/02 2017

1.2.x-dev

1.2.9999999.9999999-dev https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

03/02 2017

1.2.14

1.2.14.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

30/01 2017

2.1.2

2.1.2.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

30/01 2017

dev-LeShadow-master

dev-LeShadow-master https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

07/08 2016

2.1.1

2.1.1.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

12/07 2016

2.1.0

2.1.0.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

03/07 2016

2.0.1

2.0.1.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

03/07 2016

1.2.13

1.2.13.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

16/05 2016

2.0.0

2.0.0.0 https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

1.2.12

1.2.12.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

dev-1_2_cyrillic_email

dev-1_2_cyrillic_email https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

dev-cyrillic_email

dev-cyrillic_email https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

dev-domain_back_slash

dev-domain_back_slash https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

dev-moving_tests_around

dev-moving_tests_around https://github.com/egulias/EmailValidator

A library for validating emails against several RFCs

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

15/05 2016

dev-invalid_domains_and_backslash

dev-invalid_domains_and_backslash https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

10/05 2016

dev-v2-readme-changes

dev-v2-readme-changes https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

10/05 2016

dev-readme-updates-for-v2

dev-readme-updates-for-v2 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

30/04 2016

dev-62_validation_interface

dev-62_validation_interface https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

29/04 2016

dev-66-custom-errors

dev-66-custom-errors https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

11/11 2015

1.2.11

1.2.11.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

12/10 2015

1.2.10

1.2.10.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

22/06 2015

1.2.9

1.2.9.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation emailvalidation emailvalidator

26/04 2015

1.2.8

1.2.8.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

04/01 2015

1.2.7

1.2.7.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

29/11 2014

1.2.6

1.2.6.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

06/11 2014

1.2.5

1.2.5.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

03/11 2014

1.2.4

1.2.4.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

26/10 2014

1.2.3

1.2.3.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

02/09 2014

1.2.2

1.2.2.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

22/08 2014

1.2.1

1.2.1.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

06/07 2014

1.2.0

1.2.0.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

The Development Requires

email validator validation

13/01 2014

1.1.1

1.1.1.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

email validator validation

08/12 2013

1.1.0

1.1.0.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

email validator validation

19/05 2013

1.0.0

1.0.0.0 https://github.com/egulias/EmailValidator

A library for validating emails

  Sources   Download

MIT

The Requires

 

email validator validation