Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 4, 2024 via composer

egulias/email-validator 4.0.2

A library for validating emails against several RFCs
Package summary
Share
0
issues
1
license
5
MIT
Package created
19 May 2013
Version published
6 Oct 2023
Maintainers
1
Total deps
5
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
doctrine/lexer@3.0.1
egulias/email-validator@4.0.2
symfony/polyfill-intl-idn@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-php72@v1.29.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of egulias/email-validator 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
doctrine/lexer3.0.1-MIT
prod
symfony/polyfill-intl-idnv1.29.059.29 kBMIT
prod

Visualizations

Frequently Asked Questions

What does egulias/email-validator do?

The Egulias/Email-Validator is a comprehensive library for validating emails in accord with several Request for Comments (RFCs). It provides adherence to standards such as RFC 5321, 5322, 6530, 6531, 6532, and 1035. An RFC is a type of publication from the Internet Engineering Task Force (IETF) and the Internet Society (ISOC), the principal technical development and standard-setting bodies for the internet. These standards ensure that email addresses are validated systematically and accurately, reducing the chances of spam or incorrect email input. The EmailValidator library offers robust functionalities for carrying out precise email validations, helping businesses maintain an authentic and quality email list.

How do you use egulias/email-validator?

To utilize the Egulias/Email-Validator, you first need to install it using Composer, a tool for dependency management in PHP. To do this, simply run the command composer require egulias/email-validator in your project directory in the command line.

After installation, you will need to include the library and choose your validation strategy. Below is a basic example of how to use the library with the RFC validation:

<?php
use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\RFCValidation;

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

The validation strategies available include RFCValidation, NoRFCWarningsValidation, DNSCheckValidation, MultipleValidationWithAnd, MessageIDValidation, and even an option to create your own custom validation.

For example, to include the DNSCheckValidation alongside the RFCValidation, you can do something like this:

<?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()
]);
$validator->isValid("example@ietf.org", $multipleValidations); //true

Where are the egulias/email-validator docs?

Detailed documentation for the Egulias/Email-Validator can be found directly on its GitHub repository, under the URL https://github.com/egulias/EmailValidator.git. The GitHub documentation provides a comprehensive walkthrough of installation procedures, available validations, strategies for combining validations, and more. It's also possible to contribute to the project following the given contribution guide. The license information along with other contributors can also be found in the project repository.