v3labs/company-email-validator
最新稳定版本:1.0.0
Composer 安装命令:
composer require v3labs/company-email-validator
包简介
Company email validator
README 文档
README
The v3labs/company-email-validator package is a PHP library designed
to validate whether an email address belongs to a company domain or not.
Installation
You can install the package via Composer:
composer require v3labs/company-email-validator
Usage
To use the Company Email Validator, instantiate the CompanyEmailValidator
class and call the isValid method with the email address you want to validate.
The validation process can be customized by enabling DNS checks for domain
existence and specifying additional domains for more tailored validation.
<?php $validator = new \V3labs\Validator\CompanyEmailValidator( checkDns: false, // default additionalDomains: [] // default ); $isCompanyEmail1 = $validator->isValid('john.doe@example.com'); // false $isCompanyEmail2 = $validator->isValid('info@acme.com'); // true
Note
The validation is based on the presence of common free email domains, and emails matching these domains will be considered as non-company emails.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-26