赵大鹏 / allowed-emails
一个允许的电子邮件列表(白名单)检查器。
1.1.0
2021-06-21 22:06 UTC
Requires
- php: >=7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- infection/infection: ^0.23
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-09-22 05:41:45 UTC
README
pavlakis/allowed-emails
是一个简单的包,用于检查预定义电子邮件列表和电子邮件域名中的允许的电子邮件(也称为白名单)。
用法
通过运行以下命令安装该包
composer require pavlakis/allowed-emails
可以直接实例化 AllowedEmailList
类,或者使用以下两个命名构造函数
withAllowedAliases
withoutAllowedAliases
所需参数包括
-
电子邮件数组
array<int, string>
这些电子邮件将进行验证。 -
电子邮件域名数组
array<int, string>
这些电子邮件域名将进行验证。
如果不使用命名构造函数,则 allowAlias
布尔标志也是一个必需参数。将该值设置为 true
将将别名电子邮件视为无别名电子邮件,例如,它将匹配 me+alias@example.com
到 me@example.com
。